Problem G
Inverse Factorial
A factorial
It is straightforward to calculate the factorial of a small
integer, and you have probably done it many times before. In
this problem, however, your task is reversed. You are given the
value of
Input
The input contains the factorial
Output
Output the value of
Sample Input 1 | Sample Output 1 |
---|---|
120 |
5 |
Sample Input 2 | Sample Output 2 |
---|---|
51090942171709440000 |
21 |
Sample Input 3 | Sample Output 3 |
---|---|
10888869450418352160768000000 |
27 |