1樓:匿名使用者
因為s知道兩數之和,卻由此推斷p不知道兩個數,所以說兩數之和s一定不能拆分成兩個素數的和,即m,n不可能都是素數,且m,n中不會有大於50的素數,否則的話m*n可以唯一分解,p知道了m,n的積就一定可以知道m,n了。
p從s的言語中能夠判斷出的資訊是:
1。m,n不會全是素數;
2。m,n中不會有大於50的素數;
3。m,n之和不能拆成兩個素數的和;
4。因為s自己也不知道這兩個數是什麼,所以這兩個數的和一定小於99+98,否則s就可以知道這兩個數是什麼了。
滿足以上條件的 s=m+n有以下的可能:
1117
2327
2935
3741
47196
然後p根據自己掌握的p=m*n立即算出m,n,這說明p=m*n是具有以下性質的特殊數字:
根據這個特殊的p,當s取上面的那些值的時候,只有一種s的取值使得方程
m+n=s,
m*n=p
在[2,99]內有唯一的整數解。
根據這個性質計算出的p有以下的情況(不妨設m<=n):
p = 18, s= 11, m = 2, n = 9
p = 24, s= 11, m = 3, n = 8
p = 28, s= 11, m = 4, n = 7
p = 50, s= 27, m = 2, n = 25
p = 52, s= 17, m = 4, n = 13
p = 54, s= 29, m = 2, n = 27
p = 76, s= 23, m = 4, n = 19
p = 92, s= 27, m = 4, n = 23
p = 96, s= 35, m = 3, n = 32
p = 100, s= 29, m = 4, n = 25
p = 110, s= 27, m = 5, n = 22
p = 112, s= 23, m = 7, n = 16
p = 114, s= 41, m = 3, n = 38
p = 124, s= 35, m = 4, n = 31
p = 130, s= 23, m = 10, n = 13
p = 138, s= 29, m = 6, n = 23
p = 140, s= 27, m = 7, n = 20
p = 148, s= 41, m = 4, n = 37
p = 150, s= 35, m = 5, n = 30
p = 152, s= 27, m = 8, n = 19
p = 154, s= 29, m = 7, n = 22
p = 160, s= 37, m = 5, n = 32
p = 162, s= 27, m = 9, n = 18
p = 168, s= 29, m = 8, n = 21
p = 170, s= 27, m = 10, n = 17
p = 172, s= 47, m = 4, n = 43
p = 174, s= 35, m = 6, n = 29
p = 176, s= 27, m = 11, n = 16
p = 182, s= 27, m = 13, n = 14
p = 186, s= 37, m = 6, n = 31
p = 190, s= 29, m = 10, n = 19
p = 196, s= 35, m = 7, n = 28
p = 198, s= 29, m = 11, n = 18
p = 204, s= 29, m = 12, n = 17
p = 208, s= 29, m = 13, n = 16
p = 216, s= 35, m = 8, n = 27
p = 232, s= 37, m = 8, n = 29
p = 234, s= 35, m = 9, n = 26
p = 238, s= 41, m = 7, n = 34
p = 246, s= 47, m = 6, n = 41
p = 250, s= 35, m = 10, n = 25
p = 252, s= 37, m = 9, n = 28
p = 270, s= 37, m = 10, n = 27
p = 276, s= 35, m = 12, n = 23
p = 280, s= 47, m = 7, n = 40
p = 288, s= 41, m = 9, n = 32
p = 294, s= 35, m = 14, n = 21
p = 304, s= 35, m = 16, n = 19
p = 306, s= 35, m = 17, n = 18
p = 310, s= 41, m = 10, n = 31
p = 322, s= 37, m = 14, n = 23
p = 336, s= 37, m = 16, n = 21
p = 340, s= 37, m = 17, n = 20
p = 348, s= 41, m = 12, n = 29
p = 364, s= 41, m = 13, n = 28
p = 370, s= 47, m = 10, n = 37
p = 378, s= 41, m = 14, n = 27
p = 390, s= 41, m = 15, n = 26
p = 396, s= 47, m = 11, n = 36
p = 400, s= 41, m = 16, n = 25
p = 408, s= 41, m = 17, n = 24
p = 414, s= 41, m = 18, n = 23
p = 418, s= 41, m = 19, n = 22
p = 442, s= 47, m = 13, n = 34
p = 462, s= 47, m = 14, n = 33
p = 480, s= 47, m = 15, n = 32
p = 496, s= 47, m = 16, n = 31
p = 510, s= 47, m = 17, n = 30
p = 522, s= 47, m = 18, n = 29
p = 532, s= 47, m = 19, n = 28
p = 540, s= 47, m = 20, n = 27
p = 546, s= 47, m = 21, n = 26
p = 550, s= 47, m = 22, n = 25
p = 552, s= 47, m = 23, n = 24
p = 9604, s= 196, m = 98, n = 98
最後p說出自己已經知道m,n以後,s也說自己知道了m,n,這說明s根據自己手中的兩數之和可以推斷出唯一的m,n來。
因此還要去除上面的情況中重複用到s的情況,得到下面的情況:
p = 52, s = 17, m = 4, n = 13
p = 9604, s = 196, m = 98, n = 98
如果規定了m<>n,則最後的解答就是
m=4 , n=13
2樓:匿名使用者
p從s的言語中能夠判斷出的資訊是:
1。m,n不會全是素數;
2。m,n中不會有大於50的素數;
3。m,n之和不能拆成兩個素數的和;
4。因為s自己也不知道這兩個數是什麼,所以這兩個數的和一定小於99+98,否則s就可以知道這兩個數是什麼了。
滿足以上條件的 s=m+n有以下的可能:
11 17
23 27
29 35
37 41
47 196
然後p根據自己掌握的p=m*n立即算出m,n,這說明p=m*n是具有以下性質的特殊數字:
根據這個特殊的p,當s取上面的那些值的時候,只有一種s的取值使得方程
m+n=s,
m*n=p
在[2,99]內有唯一的整數解。
根據這個性質計算出的p有以下的情況(不妨設m<=n):
p = 18, s= 11, m = 2, n = 9
p = 24, s= 11, m = 3, n = 8
p = 28, s= 11, m = 4, n = 7
p = 50, s= 27, m = 2, n = 25
p = 52, s= 17, m = 4, n = 13
p = 54, s= 29, m = 2, n = 27
p = 76, s= 23, m = 4, n = 19
p = 92, s= 27, m = 4, n = 23
p = 96, s= 35, m = 3, n = 32
p = 100, s= 29, m = 4, n = 25
p = 110, s= 27, m = 5, n = 22
p = 112, s= 23, m = 7, n = 16
p = 114, s= 41, m = 3, n = 38
p = 124, s= 35, m = 4, n = 31
p = 130, s= 23, m = 10, n = 13
p = 138, s= 29, m = 6, n = 23
p = 140, s= 27, m = 7, n = 20
p = 148, s= 41, m = 4, n = 37
p = 150, s= 35, m = 5, n = 30
p = 152, s= 27, m = 8, n = 19
p = 154, s= 29, m = 7, n = 22
p = 160, s= 37, m = 5, n = 32
p = 162, s= 27, m = 9, n = 18
p = 168, s= 29, m = 8, n = 21
p = 170, s= 27, m = 10, n = 17
p = 172, s= 47, m = 4, n = 43
p = 174, s= 35, m = 6, n = 29
p = 176, s= 27, m = 11, n = 16
p = 182, s= 27, m = 13, n = 14
p = 186, s= 37, m = 6, n = 31
p = 190, s= 29, m = 10, n = 19
p = 196, s= 35, m = 7, n = 28
p = 198, s= 29, m = 11, n = 18
p = 204, s= 29, m = 12, n = 17
p = 208, s= 29, m = 13, n = 16
p = 216, s= 35, m = 8, n = 27
p = 232, s= 37, m = 8, n = 29
p = 234, s= 35, m = 9, n = 26
p = 238, s= 41, m = 7, n = 34
p = 246, s= 47, m = 6, n = 41
p = 250, s= 35, m = 10, n = 25
p = 252, s= 37, m = 9, n = 28
p = 270, s= 37, m = 10, n = 27
p = 276, s= 35, m = 12, n = 23
p = 280, s= 47, m = 7, n = 40
p = 288, s= 41, m = 9, n = 32
p = 294, s= 35, m = 14, n = 21
p = 304, s= 35, m = 16, n = 19
p = 306, s= 35, m = 17, n = 18
p = 310, s= 41, m = 10, n = 31
p = 322, s= 37, m = 14, n = 23
p = 336, s= 37, m = 16, n = 21
p = 340, s= 37, m = 17, n = 20
p = 348, s= 41, m = 12, n = 29
p = 364, s= 41, m = 13, n = 28
p = 370, s= 47, m = 10, n = 37
p = 378, s= 41, m = 14, n = 27
p = 390, s= 41, m = 15, n = 26
p = 396, s= 47, m = 11, n = 36
p = 400, s= 41, m = 16, n = 25
p = 408, s= 41, m = 17, n = 24
p = 414, s= 41, m = 18, n = 23
p = 418, s= 41, m = 19, n = 22
p = 442, s= 47, m = 13, n = 34
p = 462, s= 47, m = 14, n = 33
p = 480, s= 47, m = 15, n = 32
p = 496, s= 47, m = 16, n = 31
p = 510, s= 47, m = 17, n = 30
p = 522, s= 47, m = 18, n = 29
p = 532, s= 47, m = 19, n = 28
p = 540, s= 47, m = 20, n = 27
p = 546, s= 47, m = 21, n = 26
p = 550, s= 47, m = 22, n = 25
p = 552, s= 47, m = 23, n = 24
p = 9604, s= 196, m = 98, n = 98
最後p說出自己已經知道m,n以後,s也說自己知道了m,n,這說明s根據自己手中的兩數之和可以推斷出唯一的m,n來。
因此還要去除上面的情況中重複用到s的情況,得到下面的情況:
p = 52, s = 17, m = 4, n = 13
p = 9604, s = 196, m = 98, n = 98
如果規定了m<>n,則最後的解答就是
m=4 , n=13
下面是程式:
#include
#include
#include
const int max_n = 99;
const char* output_file = "result.txt";
int s[max_n*2];
int p[max_n*max_n];
int prim[max_n];
int primcounter =0;
ofstream fout( output_file );
// 計算素數
void calprim() }
} // 根據條件1過濾
void usecon_1()
for( i = 0; i < primcounter; i++ )
if( prim[i] > max_n / 2 ) break;
for( i--; i < primcounter; i++ )
for( j = 2; j < max_n; j++ )
s[ prim[i] + j ] = -1;
// 因為s自己也不知道這兩個數是什麼
for( i = 98 + 99; i < max_n + max_n; i++ )
s[i] = -1;
fout << "滿足s第一句話的兩數之和" << endl;
for( i = 0; i < max_n * 2; i++ )
if( s[i] == 0 )
fout << i << endl;
} // 根據條件2過濾
void usecon_2() }
fout << "滿足p第一句話的兩數之積:" << endl;
for( i = 0; i < max_n * max_n; i++ )
if( p[i] == 1 || p[i] == 2 )
} }void usecon_3() }
} void main()
一道智力題求解答
這裡看你定義的 自身轉 是相對於哪個物件的了,對於大圓來說,小圓在內側和外側轉過的距離是相等的,因此相對於大圓自轉的週數是一樣的,都是2周。而對於整個系統來說,小圓在內側轉時轉了1周,而在外側轉時轉了3周。具體可參見這篇文件的第11題http 兩個圓環,半徑分別是1和2,小圓在大圓內部繞大圓圓周一周...
考考你(一道智力題),解一道智力題
開始交了300 其實只交了270 而不是250元。20元包括在270元裡面的。所以根本就是障眼法!這是一道文字遊戲題,問題的關鍵是出題者將會計拿走的20元算作是270元之外的20元,而實際上,這20元是包含在270元裡面。由於老闆說要退回他們50,所以三人先交了300中的250元,另外的50元,30...
一道智力題,請多多參與 謝謝,解一道智力題
思念 想念 相思 冥思苦想 思忖 思考 翹辮子 駕崩 去世 故去 瞑目 夭折 猝然長逝捉 擒 捏 揪 端 飛速 風馳電掣 迅速 霎時 瞬間 大笑 奸笑狂笑 苦笑 冷笑 微笑 傻笑 思念 想念 相思 100萬 1000萬 去世 逝世 火花 火葬 墳墓 捉 擒 捏 揪 端 跑 衝 射 電 光 哈哈 嘿嘿...