class Solution {
public:
int trailingZeroes(int n) {
//找到所有的5
int num = 0;
while(n)
{
num += n/5;
n = n / 5;
}
return num;
}
};
LeetCode || Factorial Trailing Zeroes
最新推荐文章于 2022-02-19 19:12:08 发布