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

博客介绍了如何使用素数打表模板解决一道关于找寻最大乘积素数对的问题,该问题涉及限制条件如素数对的乘积不超过100000,且满足给定分数比例。文章讨论了不同在线判题平台的运行时间差异,并指出最大素数需求不超过10000。
摘要由CSDN通过智能技术生成

http://poj.org/problem?id=1411  POJ

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1689  ZOJ

http://acm.hdu.edu.cn/showproblem.php?pid=1239  HDU

都是同一个题,但是可能你在HDU上AC,在POJ和ZOJ上是TLE(所以还有待改进)

【题目大意】In other words, you will receive an integer m and a fraction a / b. It holds that m > 4 and 0 < a / b < 1. You should find the pair of prime numbers p, q such that pq <= m and a / b <= p / q <= 1, and furthermore, the product pq takes the maximum value among such pairs of two prime numbers. You should report p and q as the "most suitable" width and height of the translated picture.<

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值