結果

問題 No.2357 Guess the Function
ユーザー navel_tosnavel_tos
提出日時 2023-06-23 22:28:44
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 407 bytes
コンパイル時間 2,051 ms
コンパイル使用メモリ 86,732 KB
実行使用メモリ 92,292 KB
平均クエリ数 2.82
最終ジャッジ日時 2023-09-13 17:30:59
合計ジャッジ時間 2,564 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 105 ms
91,540 KB
testcase_01 WA -
testcase_02 AC 102 ms
92,292 KB
testcase_03 AC 101 ms
91,408 KB
testcase_04 AC 102 ms
91,244 KB
testcase_05 WA -
testcase_06 AC 101 ms
91,580 KB
testcase_07 AC 103 ms
91,792 KB
testcase_08 WA -
testcase_09 AC 103 ms
91,928 KB
testcase_10 AC 100 ms
91,572 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

print('?',50); N=int(input())

#A+50が余りNとなる組を抽出
X=set()
for A in range(1,101):
    for B in range(A+1,101):
        if (A+50)%B==N: X.add((A,B))

#次の質問を決める
for y in range(1,101):
    Y=set()
    for A,B in X:
        Y.add((A+y)%B)
    if len(Y)!=len(X): continue
    else: break

print('?',y); M=int(input())
for A,B in X:
    if (A+y)%B==M: print('!',A,B); exit()
    
0