PKU1411 Calling Extraterrestrial Intelligence Again
来源:互联网 发布:淘宝系统异常 编辑:程序博客网 时间:2024/05/17 23:12
先筛出所有质数p,q可能的取值,再用两重循环枚举。因为4<pq<=100000,p<=q,又p>=2 所以p,q的范围可以缩小到2~50000。又因为1<= a <= b <= 1000. ->a/b>=0.001 考虑9091这个数: 2/9091=0.00022 3/9091=0.00033 5/9091=0.00055 7/9091=0.00077 均小于0.001,所以2,3,5,7均不能作为p. 而11*9091=100001>100000; 所以无论如何9091都不能作为q。所以p,q的范围又可以缩小到2~10000。2~10000大概有1000多个质数,就可以枚举了
- PKU1411 Calling Extraterrestrial Intelligence Again
- Calling Extraterrestrial Intelligence Again
- Calling Extraterrestrial Intelligence Again
- Calling Extraterrestrial Intelligence Again
- 1186 Calling Extraterrestrial Intelligence Again
- 1411 Calling Extraterrestrial Intelligence Again
- HDU1239:Calling Extraterrestrial Intelligence Again
- HDU1239 Calling Extraterrestrial Intelligence Again
- HDU Calling Extraterrestrial Intelligence Again
- 2.Calling Extraterrestrial Intelligence Again
- ZOJ Problem 1689 Calling Extraterrestrial Intelligence Again
- 杭电1239 Calling Extraterrestrial Intelligence Again
- hdu 1239Calling Extraterrestrial Intelligence Again
- Calling Extraterrestrial Intelligence Again(谢庆皇)
- Hdu 1239 Calling Extraterrestrial Intelligence Again
- hdu1239(Calling Extraterrestrial Intelligence Again 暴力搜索)
- hdu1239 Calling Extraterrestrial Intelligence Again (枚举)
- hdu 1239 Calling Extraterrestrial Intelligence Again
- 六大运营商公布地震灾区通信恢复情况
- Yacc 与 Lex 快速入门
- 从程序员角度看ELF | Linux-Programming-国学
- JavaScript 编程引入命名空间
- Tutorial 2: Detecting a Valid PE File
- PKU1411 Calling Extraterrestrial Intelligence Again
- 解决死锁导致网站访问故障的具体实例
- 大连将在2015年启动跨海大桥建设
- flex与java相结合开发时需注意的问题
- Java Reflection API简介
- 2008年5月15日,FORM表单挂入系统流程
- I/O处理类的完整总汇
- B/S系统中动态更新菜单
- [原]用c#做了一个桌面程序用来分离excel文件里的数据时出现“操作必须使用一个可更新的查询”错误的解决