原文地址:点击打开链接
Given an integer n, return the number of trailing zeroes in n!.
Note: Your solution should be in logarithmic time complexity.
class Solution {
public:
int trailingZeroes(int n) {
int i=0;
while(n)
{
i+=n/5;
n=n/5;
}
return i;
}
};