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

吐血,是先输入p,再输入a,调试了半小时。。留下分析

Posted by yuanchuanshun at 2011-01-26 18:07:04 on Problem 3641
费马定理中  a^p % p = a,如果p是素数的话当然成立,问题是有些非素数p,也满足这个性质,
给出一些数 p,a,判断上式是否成立,如果p就是素数的话直接输出no,否则进一步用快速幂求一下判断即可,这么简单的一个题目,我看不懂题目,看了别人的题解后 代码又调试了很久  悲剧中的悲剧!!!!!!!!!!!!!!!!

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