# 【Leetcode】Factorial Trailing Zeroes

Given an integer n, return the number of trailing zeroes in n!.

Note: Your solution should be in logarithmic time complexity.

public int trailingZeroes(int n) {
int result = 0;
while (n / 5 != 0) {
result += n / 5;
n = n / 5;
}
return result;
}


#### 172. Factorial Trailing Zeroes [easy] (Python)

2016-06-05 17:40:21

#### LeetCode(172) Factorial Trailing Zeroes

2015-01-02 03:46:08

#### leetcode 172: Factorial Trailing Zeroes

2014-12-30 09:54:52

#### 【LeetCode-面试算法经典-Java实现】【172-Factorial Trailing Zeroes（阶乘尾后0的数目）】

2015-08-23 06:43:47

#### Leetcode: Factorial Trailing Zeroes

2015-01-02 21:23:32

#### leetcode 172. Factorial Trailing Zeroes（C语言，阶乘中尾数0的个数）26

2017-10-08 13:12:47

#### LeetCode：求阶乘后面的0的个数（Factorial Trailing Zeroes）

2016-04-03 15:54:48

#### LeetCode Factorial Trailing Zeroes数学方法详解

2016-08-05 15:14:24

#### LeetCode Weekly Contest 74 793. Preimage Size of Factorial Zeroes Function【二分】

2018-03-04 17:57:24

#### leetcode#793. Preimage Size of Factorial Zeroes Function

2018-03-05 21:58:01