0172. Factorial Trailing Zeroes
https://leetcode.com/problems/factorial-trailing-zeroes
Description
Given an integer n
, return the number of trailing zeroes in n!
.
Note that n! = n * (n - 1) * (n - 2) * ... * 3 * 2 * 1
.
Example 1:
Example 2:
Example 3:
Constraints:
0 <= n <= 104
Follow up: Could you write a solution that works in logarithmic time complexity?
ac
Last updated