一、题目要求
Given an integer n, return the number of trailing zeroes in n!.
Note: Your solution should be in logarithmic time complexity.
二、代码实现
int trailingZeroes(int n) {
int base=5;
int result=0;
while(n>=base)
{
result+=n/5;
n/=5;
}
return result;
}