Loading repovive.com/problems/classics/7
The factorial of n is defined as:
Given n, compute n!mod(109+7).
n
n!mod(109+7)
0
For this input, the required output is 1.
1
5
For this input, the required output is 120.
120
10
For this input, the required output is 3628800.
3628800
1000
For this input, the required output is 641419708.
641419708