首页 > 其他分享> > LeetCode 172. 阶乘后的零 Factorial Trailing Zeroes LeetCode 172. 阶乘后的零 Factorial Trailing Zeroes 2020-05-27 10:06:29 作者:互联网 数学分析。 class Solution { public: int trailingZeroes(int n) { int cnt = 0; while (n >= 5) { cnt += n / 5; n /= 5; } return cnt; } }; 标签:Zeroes,cnt,return,int,Factorial,阶乘 来源: https://www.cnblogs.com/ZSY-blog/p/12970701.html