n n n的阶乘后0的个数
class Solution {
public:
/*
* @param n: A long integer
* @return: An integer, denote the number of trailing zeros in n!
*/
long long trailingZeros(long long n) {
// write your code here, try to do it without arithmetic operators.
long long res = 0.0;
while(n){
n /= 5;
res += n;
}
return res;
}
};