每日一题力扣172

给定一个整数 n,返回 n! 结果尾数中零的数量。

包含5的就可以,因为出现5就意味着肯定有2,

class Solution:
    def trailingZeroes(self, n: int) -> int:
        count=0
        while n>=5:
            count+=n//5
            n/=5
        return int(count)
原文地址:https://www.cnblogs.com/liuxiangyan/p/14512959.html