172. 阶乘后的零
解法一:观察
class Solution:
def trailingZeroes(self, n: int) -> int:
count = 0 #统计5的个数
#循环除以5
while n:
n //= 5
count += n
return count最后更新于
class Solution:
def trailingZeroes(self, n: int) -> int:
count = 0 #统计5的个数
#循环除以5
while n:
n //= 5
count += n
return count最后更新于