#P10744. [SEERC 2020] Modulo Permutations
[SEERC 2020] Modulo Permutations
Problem Description
Count the number of all permutations of of length that satisfy (where ), and output the result modulo .
Input Format
One integer .
Output Format
Output the answer modulo .
1
1
2
2
3
6
4
16
5
40
1000000
581177467
Hint
Translated by ChatGPT 5