We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 513630f commit 822b471Copy full SHA for 822b471
172. Factorial Trailing Zeroes.cpp
@@ -1,6 +1,7 @@
1
class Solution {
2
public:
3
int trailingZeroes(int n) {
4
+ // every leading zero is generated by 2*5 and cnt of 5 << cnt of 2;
5
int ans = 0;
6
while(n / 5 > 0){
7
ans += n / 5;
0 commit comments