結果

問題 No.246 質問と回答
ユーザー yuki2006yuki2006
提出日時 2015-07-13 11:47:04
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 227 bytes
コンパイル時間 1,983 ms
コンパイル使用メモリ 77,216 KB
実行使用メモリ 92,516 KB
平均クエリ数 30.87
最終ジャッジ日時 2023-09-23 19:48:30
合計ジャッジ時間 7,287 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
92,208 KB
testcase_01 AC 115 ms
91,988 KB
testcase_02 AC 114 ms
91,632 KB
testcase_03 AC 118 ms
92,088 KB
testcase_04 AC 117 ms
92,504 KB
testcase_05 AC 116 ms
92,396 KB
testcase_06 AC 113 ms
92,368 KB
testcase_07 AC 116 ms
92,084 KB
testcase_08 AC 116 ms
92,040 KB
testcase_09 AC 116 ms
92,224 KB
testcase_10 AC 114 ms
92,220 KB
testcase_11 AC 114 ms
92,356 KB
testcase_12 AC 114 ms
92,344 KB
testcase_13 AC 115 ms
91,980 KB
testcase_14 AC 116 ms
91,832 KB
testcase_15 AC 118 ms
91,980 KB
testcase_16 AC 119 ms
92,340 KB
testcase_17 AC 115 ms
92,496 KB
testcase_18 AC 117 ms
92,168 KB
testcase_19 AC 116 ms
92,204 KB
testcase_20 AC 116 ms
91,640 KB
testcase_21 AC 116 ms
92,392 KB
testcase_22 AC 114 ms
91,964 KB
testcase_23 AC 117 ms
92,260 KB
testcase_24 AC 114 ms
92,516 KB
testcase_25 AC 114 ms
91,928 KB
testcase_26 AC 115 ms
92,264 KB
testcase_27 AC 116 ms
92,392 KB
testcase_28 AC 113 ms
92,180 KB
testcase_29 AC 117 ms
92,204 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

A = 0
B = 10 ** 9 + 1

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

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