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

遍历所有因子超时

Posted by lihuiyykl at 2009-08-10 15:10:07 on Problem 3696 and last updated at 2009-08-11 00:29:13
使用欧拉函数求出phi(m)值后,需要从小到大验证phi(m)的所有因子x,
如果phi(m)很大,那么它的因子x也可能很大,所以每次验证10^x mod m是否等于1也就用掉了很多时间,
我的程序因为这而超时,请问有什么好的方法能迅速验证10^x mod m是否等于1哇?大牛们多多指教,谢谢啦

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