#P3927. SAC E#1 - 一道中档题 Factorial
SAC E#1 - 一道中档题 Factorial
Description
SOL 君 likes factorials, while SOL 菌 enjoys studying number bases.
One day, SOL 君 showed off to SOL 菌 by casually computing the factorial of .
SOL 菌 was unconvinced and immediately wanted to compute the number of trailing zeros of this number in base .
However, SOL 菌 is not skilled enough, so he asks you for help.
Input Format
Each input contains a single line with two integers .
Output Format
Output a single integer: the number of trailing zeros of in base .
10 40
2
Hint
- For of the testdata, .
- For another of the testdata, .
- For of the testdata, .
Update
- Each test point contains only one test case.
- will not be .
- Now the std does not overflow
long long. - If there is any problem with the testdata, contact icy (it is recommended not to code to the data).
Translated by ChatGPT 5
京公网安备 11011102002149号