Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
15MS过,,谈谈我的思路.顺便给RE..TEL,..WA的同学一些数据....data: 2146483648 2147483647 2146483811,2146483813 are closest, 2146841093,2146841273 are most distant. 1 2 There are no adjacent primes. 1 100 2,3 are closest, 89,97 are most distant. --------------------------------------------------------------------- 首先找出并将2~2^16的素数存在一数组中..然后在L...U中用这些素数以筛选法删除掉所有合数..最后扫描判断最近最远即可.. Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator