![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c语言
x-robot
这个作者很懒,什么都没留下…
展开
-
求一个阶乘最后面一个非零数
求一个阶乘最后面一个非零数DescriptionN的阶乘写作N!表示小于等于N的所有正整数的乘积。阶乘会很快的变大,如13!就必须用32位整数类型来存储,70!即使用浮点数也存不下了。你的任务是找到阶乘最后面的非零位。举个例子,5!=12345=120所以5!的最后面的非零位是2,7!=1234567=5040,所以最后面的非零位是4。Input共一行,一个整数不大于4,220的整数N。Output共一行,输出N!最后面的非零位。Sample Input7Sample Output4老原创 2021-03-09 09:52:14 · 860 阅读 · 0 评论 -
杭电1009 额外测试数据
杭电1009 额外测试数据做杭电1109时给的样本测试都对,但一直wa,最后发现没有考虑J或者F为0的情况,可以试试下面的数据。/* Test data: 0 3 100 0 100 0 100 0 Answer 300.000 */原创 2021-02-19 21:15:08 · 91 阅读 · 0 评论 -
2021-02-17
DescriptionIn the 22nd Century, scientists have discovered intelligent residents live on the Mars. Martians are very fond of mathematics. Every year, they would hold an Arithmetic Contest on Mars (ACM). The task of the contest is to calculate the sum of t原创 2021-02-17 20:20:44 · 71 阅读 · 0 评论