摘要: 思路:虽然看到题目就想到了用欧拉函数做,但就是不知道怎么做...当a b互质时GCD(a,b)= 1,由此我们可以推出GCD(k*a,k*b)= k。设ans[i]是1~i-1与i的GCD之和,所以最终答案是将ans[0]一直加到ans[n]。当 k*i==j 时,a... 阅读全文
posted @ 2018-04-05 16:02 KirinSB 阅读(121) 评论(0) 推荐(0) 编辑
摘要: You task is to find minimal natural number N, so that N! contains exactly Q zeroes on the trail in decimal notation. As you know N! = ... 阅读全文
posted @ 2018-04-05 10:24 KirinSB 阅读(114) 评论(0) 推荐(0) 编辑