#include <iostream>
#include <cstdio>
using namespace std;
//英语       抄博友程序     博友程序更快    易超时
int prim[10000];
int p[10000];
int main()
{int num=0; for(int i=2;i*i<10000;i++){if(prim[i]==0){//p[num++]=i;//wa  for(int j=2;j*i<10000;j++){prim[i*j]=1;}}}for(int i=2;i<10000;i++){if(prim[i]==0){p[num++]=i;}}while(1){int m,a,b;//cin>>m>>a>>b;scanf("%d%d%d",&m,&a,&b);if(m==0 && a==0 && b==0){break;}int ans=0;int ti;int tj;for(int i=0;i<num && p[i]*p[i]<=m;i++)//抄博友程序   背 //for(int i=num-1;i>=0;i--)//抄博友程序 {//for(int j=i;j<num;j++)for(int j=num-1;j>=i;j--){if(p[i]*p[j]<=m && (double)p[i]/(double)p[j]>=((double)a/(double)b)){if(p[i]*p[j]>ans){ans=p[i]*p[j];ti=i;tj=j;break;}}}}cout<<p[ti]<<" "<<p[tj]<<endl;}return 0;
}

POJ 1411 Calling Extraterrestrial Intelligence Again G++ 易超时相关推荐

  1. Calling Extraterrestrial Intelligence Again

    Calling Extraterrestrial Intelligence Again Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 6 ...

  2. 413:Calling Extraterrestrial Intelligence Again(翻译 )

    来源:http://noi.openjudge.cn/ch0207/413/ Calling Extraterrestrial Intelligence Again 总时间限制: 1000ms 内存限 ...

  3. HDU 1239 Calling Extraterrestrial Intelligence Again

    题目 http://acm.hdu.edu.cn/showproblem.php?pid=1239 Problem Description A message from humans to extra ...

  4. 08:Calling Extraterrestrial Intelligence AgainMOOC程序设计算法基础期末第八题

    问题表述: A message from humans to extraterrestrial intelligence was sent through the Arecibo radio tele ...

  5. 【HDU/POJ/ZOJ】Calling Extraterrestrial Intelligence Again (素数打表模板)

    http://poj.org/problem?id=1411  POJ http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=168 ...

  6. 【HDOJ】1239 Calling Extraterrestrial Intelligence Again

    这题wa了很多词,题目本身很简单,把a/b搞反了,半天才检查出来. 1 #include <stdio.h> 2 #include <string.h> 3 #include ...

  7. 【筛法求素数】HDU-1239 Calling Extraterrestrial Intelligence Again

    注解 1.首先用筛法求100000以内的素数,并找到其个数. 2.在所有找到的素数中,遍历找一个素数对,满足: (1)二者相乘小于等于m: (2)二者相乘是所有满足条件的素数对中的最大的: (3)二者 ...

  8. 大学英语(第六册)复习(原文及全文翻译)——Unit 3 - The Quest For Extraterrestrial Intelligence(搜寻外星人)

    Unit 3 - The Quest For Extraterrestrial Intelligence Are we humans alone in the universe? Or is ther ...

  9. CodeForces刷题C语言:What is for dinner?、Reconnaissance 2、Shell Game、Extra-terrestrial Intelligence、Extra

    记录洛谷刷题c语言QAQ 一.What is for dinner? 题面翻译 题面描述 鲨鱼有 n n n 颗牙齿,分别分布于 m m m 行上,第 i i i 颗牙齿有一个初始活力值 c i c_ ...

最新文章

  1. 翻译 | 摆脱浏览器限制的JavaScript
  2. timeSetEvent
  3. JEPaaS笔记||学习培训资料||案例视频 【全套】
  4. matlab批量生成灰度图像_科学网—matlab彩色图像的批处理转换为灰度、二值和主成分图图像 - 金秀良的博文...
  5. [C++STL]set容器用法介绍
  6. 现代程序设计 作业 第1次
  7. java annotation list_java-注解annotation
  8. java 一致性hash算法 均衡分发_Dubbo一致性哈希负载均衡的源码和Bug,了解一下?...
  9. Leetcode每日一题:剑指 Offer 04.(二维数组中的查找)
  10. C#基础17:匿名方法与Lambda表达式
  11. python series拼接_pandas数据拼接的实现示例
  12. EXT2.0 多选下拉框
  13. 快速实现M5311 NBIOT TCP通信
  14. 博弈论一 [ 巴什博奕 ]
  15. 大数据之路——数据挖掘
  16. vue RSA加密算法(jsencrypt)的使用
  17. 计算机类基金有哪些2019,2019年度国家自然科学基金最终立项数据,哪些高校表现突出?...
  18. nodejs中的__filename和__dirname
  19. 23种设计模式-桥梁模式《官渡之战》
  20. 中职计算机专业课题,《中职计算机教学中激励机制的研究》课题开题报告

热门文章

  1. BZOJ 4408: [Fjoi 2016]神秘数(可持久化线段树)
  2. TapTap物理画线游戏,使用Unity实现2D物理画线功能
  3. 宝塔Linux面板使用
  4. 撩魅登录时显示服务器错误是什么意思,暧昧期女生撩男生的套路 暧昧的时候要注意什么...
  5. 删除Excel单元格中空行
  6. 一篇文章解决计算机基础——进制转换难题
  7. windows 10 python 3.7.9 install rosbag
  8. pytorch下Numpy,Torch,Spicy,NetworkX及其他基本数据类型相关操作(持续更新)
  9. 云服务器 ghost系统,在Ubuntu 18.04操作系统上安装Ghost CMS的步骤
  10. 打开Qt Creator软件时报警告:xxx.exe应用程序错误