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 cx19860824 at 2007-03-07 16:02:10 on Problem 3209
In Reply To:Re:这么大的数N如何分解质因数? Posted by:cx19860824 at 2007-03-07 16:01:26
> 我用的筛法先找出了所有n^(1/3)的质数,如果n能分解成3个以上的话,这是肯定可以通过前面找到的,判断完后n只可能是质数或者两个的积,测试n是否两个的积是很难的,所以可以测试它是否质数,以及它自身是否完全平方数,如果都不是,那就没问题了,但是这里测试质数我遇到了困难,没想到直接当成YES输出就AC了,测试数据欠缺特殊情况

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