POJ ..

POJ ..
> RT,求括号括起来那句的意思.
>
> For each test case,print one line of the form n = a + b,where a and b are odd primes.Numbers and operators should be separated by exactly one blank like in the sample output below.If there is more than one pair of odd primes adding up to n,【choose the pair where the difference b - a is maximized】.If there is no such pair,print a line saying "Goldbach's conjecture is wrong."
>
>
>
英语人气:167 ℃时间:2020-01-28 22:33:29
优质解答
就是说如果有多个(a,b)数对满足n=a+b的话,那么选择差b-a最大的那一对.
就比如n=16时,可以是(3,13)或者(5,11)
那么选择输出(3,13)这一组,因为13-3=10,11-5=6,而10>6.
我来回答
类似推荐
请使用1024x768 IE6.0或更高版本浏览器浏览本站点,以保证最佳阅读效果。本页提供作业小助手,一起搜作业以及作业好帮手最新版!
版权所有 CopyRight © 2012-2024 作业小助手 All Rights Reserved. 手机版