摘要: 给定一个数$n$,求$n!$有多少个后缀0。比如$5!=1\times2\times3\times4\times5=120$,有1个后缀0。 ### n!的后缀0 因为只有$2\times5$才能产生后缀0,且2因子的数量一定比5因子的数量更多,所以只需要判断5因子的数量即可。 先计算1~n之间有多 阅读全文
posted @ 2023-08-05 20:44 wuyoudexian 阅读(59) 评论(0) 推荐(0)