“”"
求出20的阶乘的结果的末尾位数为0的个数
“”"
def num_test():
num = 20
num_jie = 1
num_jie_a = 0
num_jie_b = 0
a = 0
for i in range(1, num):
num_jie = num_jie * i
while (True):
for j in range(1, num):
num_jie_a = num_jie % 10
if num_jie_a == 0:
a += 1
num_jie = int(num_jie // 10)
if num_jie_a != 0:
break
if num_jie <= 0:
break
print(a)
num_test()