Time Limit: 2 second(s) | Memory Limit: 32 MB |
Factorial (阶层)of an integer is defined by the following function
f(0) = 1
f(n) = f(n - 1) * n, if(n> 0)
So, factorial of 5 is 120. But in different bases, the factorial may be different. For example, factorial of 5 in base 8 is 170.
In this problem, you have to find the number of digit(s) of the factorial of an integer in a certain base.
Input