题解 | 阶乘尾零
阶乘尾零
https://www.nowcoder.com/practice/434922f9f4724b97b83c417e884008f1
#include <cmath>
class Factor {
public:
int getFactorSuffixZero(int n) {
// write code here
int res =0;
while (n) {
n /=5;
res+=n;
}
return res;
}
};