Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
一直在WA中.....说一下我的思路将A进行质因数分解得到p1, p2, p3....数量分别是n1, n2, n3 A^B的所有约数的和是(p1^0 + p1^1 + ......+p1^(n1 * B)) * (p2 ^0 + p2^1 + ....p2^(n2 * B))*... 这个结果是 (p1^(n1 * B + 1) - 1) / (p1 - 1) * (p2 ^ (n2 * B + 1) / (p2 - 1)) * ..... 由于9901是质数,所以可以用同余来求 利用二分的思想把分子除9901的余数和分母除9901的余数算出来,然后就可以唯一的求出结果 请大牛们指教一下有什么地方出了问题 谢谢! Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator