148. Factorial Trailing Zeroes

MediumMath

Given an integer n, return the number of trailing zeroes in n!. Note that n! = n * (n - 1) * (n - 2) * ... * 3 * 2 * 1.

Examples

Input: 100

Output: 24

Explanation: 100/5 + 100/25 = 20 + 4 = 24.

Constraints

  • 0 <= n <= 10^4
Loading...

Run checks all cases above. Submit evaluates all test cases.