Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

一直在WA中.....说一下我的思路

Posted by oeym at 2006-04-04 23:50:19 on Problem 1845
将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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator