Problem 44068. The number of trailing zero digit of a factorial

For given positive integer n, take factorial of that number. How many trailing zeros does it have?

Example: factorial(11) = 39916800

Its last zero-digit count is 2.

Optional: Can you make an efficient algorithm for a very large n?

Solution Stats

52.27% Correct | 47.73% Incorrect
Last Solution submitted on Jul 10, 2020

Problem Comments