結果

問題 No.246 質問と回答
コンテスト
ユーザー rlangevin
提出日時 2023-01-14 13:52:26
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 99 ms / 2,000 ms
コード長 233 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 129 ms
コンパイル使用メモリ 84,992 KB
実行使用メモリ 71,584 KB
平均クエリ数 30.90
最終ジャッジ日時 2026-03-31 09:45:17
合計ジャッジ時間 5,171 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys

yes = 1
no = 10 ** 9 + 1
while no - yes != 1:
    mid = (yes + no)//2
    print("? %d" % mid)
    sys.stdout.flush()
    if int(input()):
        yes = mid
    else:
        no = mid
print("! %d" % yes)
sys.stdout.flush()
0