文件名称:main
介绍说明--下载内容均来自于网络,请自行研究使用
多家大公司笔试题目程序解答:
1.1-20的两个数把和告诉A,积告诉B,A说不知道是多少,B也说不知道,
这时A说我知道了,B接着说我也知道了,问这两个数是多少?
设这两个数是x和y。且x+y=A, xy=B
计算结果:1~20: 结果为2,2
2~20: 结果为4,3
2. 2~100中两个数,把和告诉A,乘积告诉B,A说:我不知道,你也不知道;
这时B说我知道了,A说我也知道了。
设这两个数是x和y,且x+y=A, xy=B-Many large companies program written questions:
The two Numbers 1.1-20 and tell A, B, tell how much is A says don t know, B also said don t know,
Then said I know A, B then said I also know, ask the two Numbers?
Set the two Numbers is x and y. And x, y+ xy = B
Results: 1 ~ 20: the results for the viewpoint
2 ~ 20:4,3 results
1.1-20的两个数把和告诉A,积告诉B,A说不知道是多少,B也说不知道,
这时A说我知道了,B接着说我也知道了,问这两个数是多少?
设这两个数是x和y。且x+y=A, xy=B
计算结果:1~20: 结果为2,2
2~20: 结果为4,3
2. 2~100中两个数,把和告诉A,乘积告诉B,A说:我不知道,你也不知道;
这时B说我知道了,A说我也知道了。
设这两个数是x和y,且x+y=A, xy=B-Many large companies program written questions:
The two Numbers 1.1-20 and tell A, B, tell how much is A says don t know, B also said don t know,
Then said I know A, B then said I also know, ask the two Numbers?
Set the two Numbers is x and y. And x, y+ xy = B
Results: 1 ~ 20: the results for the viewpoint
2 ~ 20:4,3 results
相关搜索: 笔试题
(系统自动生成,下载前可以参看下载内容)
下载文件列表
main.cpp