結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 101 ms
91,532 KB
testcase_01 WA -
testcase_02 AC 99 ms
92,296 KB
testcase_03 AC 101 ms
92,348 KB
testcase_04 AC 97 ms
91,720 KB
testcase_05 WA -
testcase_06 AC 99 ms
92,060 KB
testcase_07 AC 100 ms
91,808 KB
testcase_08 WA -
testcase_09 AC 100 ms
92,268 KB
testcase_10 AC 99 ms
91,828 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); break
exit()
0