Return the number of zeros at the end of n! (n! = 1 × 2 × ... × n).
For n = 25 the answer is 6 (25! = 15511210043330985984000000).
The starter code visits every number up to n. It is correct but too slow for large n.
Example 1
Input:
trailing_zeros(25)
Output:
6
Example 2
Input:
trailing_zeros(5)
Output:
1
0 <= n <= 9 * 10**15No results yet
Run your code to check it against the examples, or submit to run every test.