結果

問題 No.2357 Guess the Function
ユーザー Alex WiceAlex Wice
提出日時 2023-06-23 21:51:14
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 463 bytes
コンパイル時間 1,376 ms
コンパイル使用メモリ 86,928 KB
実行使用メモリ 87,628 KB
平均クエリ数 3.00
最終ジャッジ日時 2023-09-13 16:51:18
合計ジャッジ時間 2,531 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 95 ms
87,220 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 98 ms
87,604 KB
testcase_04 AC 97 ms
87,404 KB
testcase_05 WA -
testcase_06 AC 94 ms
87,404 KB
testcase_07 AC 95 ms
87,228 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 97 ms
87,628 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

print("? 1")
sys.stdout.flush()
A = int(input())
if A >= 1:
    A -= 1
    print("? 100")
    sys.stdout.flush()
    A2 = int(input())
    for B in range(A + 1, 101):
        if (A + 100) % B == A2:
            break
    print("!", A, B)
    sys.stdout.flush()

else:
    print("? 100")
    sys.stdout.flush()
    A2 = int(input())
    for B in range(1, 101):
        if 99 % B == A2:
            break
    print("!", B - 1, B)
    sys.stdout.flush()
0