Skip to content

Commit 822b471

Browse files
Update 172. Factorial Trailing Zeroes.cpp
1 parent 513630f commit 822b471

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

172. Factorial Trailing Zeroes.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
class Solution {
22
public:
33
int trailingZeroes(int n) {
4+
// every leading zero is generated by 2*5 and cnt of 5 << cnt of 2;
45
int ans = 0;
56
while(n / 5 > 0){
67
ans += n / 5;

0 commit comments

Comments
 (0)