返回题库

100! 末尾有多少个 0

Trailing Zeros

专题
Brainteaser / 脑筋急转弯
难度
L2

题目详情

问:100!100! 的十进制表示末尾有多少个 0?

How many trailing zeros are there in 100!100!?

解析

尾零由因子 10 贡献,等价于统计 2 与 5 的配对数;2 远多于 5,因此只需数 5 的个数:

1005+10025=20+4=24.\left\lfloor\frac{100}{5}\right\rfloor+\left\lfloor\frac{100}{25}\right\rfloor=20+4=24.

所以末尾有 24 个 0。


Original Explanation

There are 24 trailing zeros. The number of trailing zeros equals the number of factors of 5 in 100!100! (since factors of 2 are abundant). We compute: 1005+10052=20+4=24.\left\lfloor \frac{100}{5} \right\rfloor + \left\lfloor \frac{100}{5^2} \right\rfloor = 20 + 4 = 24.