結果

問題 No.246 質問と回答
ユーザー yuki2006
提出日時 2015-07-13 11:45:37
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 222 bytes
コンパイル時間 202 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 25,844 KB
平均クエリ数 30.00
最終ジャッジ日時 2024-07-16 06:50:14
合計ジャッジ時間 3,623 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

A = 0
B = 10 ** 9 + 1

while B - A > 1:
    c = (A + B) // 2
    print "? %d" % c
    sys.stdout.flush()
    response = raw_input()

    if response == 1:
        A = c
    else:
        B = c
print "! %d" % A
0