結果

問題 No.3212 SUPER Guess the Number
ユーザー 👑 loop0919
提出日時 2025-07-14 12:54:20
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 264 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 82,752 KB
実行使用メモリ 71,148 KB
平均クエリ数 22.00
最終ジャッジ日時 2025-07-25 21:00:40
合計ジャッジ時間 3,145 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

prev = 10**6 + 1
print("?", prev)

ok, ng = 1, 10**6
while abs(ok - ng) > 1:
    mid = (ok + ng) // 2
    curr = 2 * mid - prev
    
    print("?", curr)
    
    if (int(input()) == 1) == (prev < curr):
        ok = mid
    else:
        ng = mid

print("!", ok)
0