結果

問題 No.2357 Guess the Function
ユーザー Alex Wice
提出日時 2023-06-23 21:51:14
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 463 bytes
コンパイル時間 270 ms
コンパイル使用メモリ 82,356 KB
実行使用メモリ 70,448 KB
平均クエリ数 3.00
最終ジャッジ日時 2024-07-01 01:26:25
合計ジャッジ時間 1,838 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 5 WA * 5
権限があれば一括ダウンロードができます

ソースコード

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