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

Re:此題不能用逆元求和。gcd(p-1,9901)可能等於9901

Posted by 2012liuxin at 2016-07-28 14:14:48 on Problem 1845
In Reply To:Re:此題不能用逆元求和。gcd(p-1,9901)可能等於9901 Posted by:sleepingpig at 2010-12-05 18:37:14
非常感谢,很有道理
可以直接ans*=(p^0+p^1+...+p^k)改成
if (gcd(p-1,9901)==9901) then ans*=(k+1);
else ans*=公式...逆元

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