結果

問題 No.246 質問と回答
ユーザー nanae
提出日時 2017-03-17 01:49:26
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 78 ms / 2,000 ms
コード長 223 bytes
コンパイル時間 151 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 27,480 KB
平均クエリ数 30.90
最終ジャッジ日時 2024-07-16 20:11:19
合計ジャッジ時間 4,011 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

top = 10**9 + 1
btm = 1

while top - btm > 1:
    mid = (top + btm) // 2

    print(f'? {mid}', flush=True)
    flag = int(input())

    if flag:
        btm = mid
    else:
        top = mid

print(f'! {btm}', flush=True)
0