回复:answer

来源: guest007 2010-02-12 06:18:15 [] [旧帖] [给我悄悄话] 本文已被阅读: 次 (1649 bytes)
回答: expert level - hard and time consumingguest0072010-02-06 04:43:12
It is a three or four start question to just check/understand a answer.


Preparation-
Let’s define “Qualified Sum” as a value which allows S to say:" Mr.S: I knew you (P) couldn't"
Thus,
29 is a “qualified sum” (this is a two star question - you can figure it out).
34 is not a “qualified sum” since 34 = 7 + 23= 5+29…
56 is not since 56 = 37 + 19
25 is a “qualified sum”

Not back to your answer: 13 and 16
S = 29= 13 &16 but also = 3&26= 4&25 …
P= 208= 13 &16 but also = 26 & 8 = 52 & 4 =

Checking-

Mr.P: I can't find the numbers;
Checked OK- P does not know if it is 13&16, 26&8 or 52&4;

-Mr.S: Neither can I, but I knew you couldn't
Checked OK- S knows 29 and 29 is a “Qualified Sum”

-Mr.P: Now that you said that, I can find them!
Checked OK-
Based on S mentioned it is a qualified sum-
P eliminated 26&8 (where 26+8 = 34 is NOT a qualified sum)
P eliminated 52&4 (where 56 is NOT a qualified sum)
So now P knows it is 13&16 possible

-Mr.S: Since you can find then, I can also find them!
Based on P’s statement
S eliminated 3&26 P could be 3* 26 or 6 * 13 but 19 and 29 are BOTH qualified sum
S eliminated 4&25 P could be 4x25 or 20 x 5 but 25 and 29 are BOTH qualified.
….
If here S eliminated all but 13&16. Then you are the winner!! (i have to admit i am lazy and did not do the programming myself..)
This is where a computer may help- I DID NOT CHECK THROUGH, but the idea is here and hope you can understand (three star question here already).






所有跟帖: 

yes my code follows exactly what you said. -dynamic- 给 dynamic 发送悄悄话 (1055 bytes) () 02/13/2010 postreply 07:02:55

回复:yes my code follows exactly what you said. -巡天剑客- 给 巡天剑客 发送悄悄话 (174 bytes) () 09/08/2010 postreply 03:54:50

高手- well-done~ -guest007- 给 guest007 发送悄悄话 (0 bytes) () 02/13/2010 postreply 18:35:07

请您先登陆,再发跟帖!

发现Adblock插件

如要继续浏览
请支持本站 请务必在本站关闭/移除任何Adblock

关闭Adblock后 请点击

请参考如何关闭Adblock/Adblock plus

安装Adblock plus用户请点击浏览器图标
选择“Disable on www.wenxuecity.com”

安装Adblock用户请点击图标
选择“don't run on pages on this domain”