Submeter | Todas submissőes | Melhores | Voltar |
Problem hidden
IFACTO - Do you know Factorials |
Factorial of a number N can be defined as: N! = 1 * 2 * 3 * 4 * ..... * (N-1) * N.
Also 0! = 1.
As this could be large number, So we don't want you to calculate it. Instead you are given factorial of a number and you have to predict the number.
Input
The first line of input contain n!.
Constraints
- 2 ≤ n!
- 1 ≤ d ≤ 106 (d is total number of digits in the n!)
Output
For each given n! print value of n.
Example
Input: 24 Output: 4
Input: 51090942171709440000 Output: 21
Input: 10888869450418352160768000000 Output: 27
Adicionado por: | Amit |
Data: | 2020-06-16 |
Tempo limite: | 0.100s-0.200s |
Tamanho do fonte: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Linguagem permitida: | Todas exceto: ASM64 CLOJURE ERL FSHARP PERL6 PY_NBC SCALA TCL |