Number of trailing zeros of N!

Instructions

Write a program that will calculate the number of trailing zeros in a factorial of a given number.

N! = 1 * 2 * 3 * ... * N

Be careful 1000! has 2568 digits...

For more info, see http://mathworld.wolfram.com/Factorial.html

Python


Tags

  1. python (Private)
  2. math (Private)
  3. 5-kyu (Private)
  4. codewars (Private)
  5. answer (Private)