結果

問題 No.246 質問と回答
ユーザー tubo28tubo28
提出日時 2015-07-17 22:34:54
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 280 bytes
コンパイル時間 123 ms
コンパイル使用メモリ 6,480 KB
実行使用メモリ 24,360 KB
平均クエリ数 30.87
最終ジャッジ日時 2023-09-23 06:59:21
合計ジャッジ時間 3,548 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
23,364 KB
testcase_01 AC 53 ms
24,036 KB
testcase_02 AC 53 ms
23,652 KB
testcase_03 AC 54 ms
23,616 KB
testcase_04 AC 55 ms
23,676 KB
testcase_05 WA -
testcase_06 AC 52 ms
23,412 KB
testcase_07 AC 53 ms
24,240 KB
testcase_08 WA -
testcase_09 AC 53 ms
24,336 KB
testcase_10 AC 52 ms
23,640 KB
testcase_11 AC 53 ms
23,664 KB
testcase_12 AC 53 ms
23,376 KB
testcase_13 AC 52 ms
23,532 KB
testcase_14 AC 53 ms
24,072 KB
testcase_15 WA -
testcase_16 AC 53 ms
23,556 KB
testcase_17 AC 54 ms
24,336 KB
testcase_18 WA -
testcase_19 AC 52 ms
23,400 KB
testcase_20 AC 52 ms
23,400 KB
testcase_21 WA -
testcase_22 AC 54 ms
23,376 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 53 ms
23,544 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 52 ms
24,300 KB
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

res = 1
l = 0
r = 1000000000+1
while l+1 < r:
    m = (l+r)/2
    print ("? %d" % m)
    sys.stdout.flush()
    res = int(input())
    if res == 1:
        l = m
    else:
        r = m
if res==1:
    print("! %d" % res)
else:
    print("! %d" % l)
sys.stdout.flush()
0