标签:leetcode
注意越界!
class Solution {
public:
int trailingZeroes(int n) {
int sum = 0;
long long i =5;
while(i<=n)
{
sum += n/i;
i *= 5;
}
return sum;
}
};
leetcode:Factorial Trailing Zeroes
标签:leetcode
原文地址:http://blog.csdn.net/majing19921103/article/details/44999961