Cody

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

Created by Jihye Sofia Seo in Community

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

65.22% Correct | 34.78% Incorrect
Last solution submitted on Mar 01, 2019