Nice Enough Permutations

Limite di tempo: 2 sec
/
Limite di memoria: 256 MB
Input/output: stdin / stdout
Punteggio massimo: 407