結果

問題 No.246 質問と回答
ユーザー 紙ぺーぱー紙ぺーぱー
提出日時 2015-05-08 16:13:11
言語 Python2
(2.7.18)
結果
AC  
実行時間 61 ms / 2,000 ms
コード長 235 bytes
コンパイル時間 1,046 ms
コンパイル使用メモリ 6,648 KB
実行使用メモリ 24,288 KB
平均クエリ数 101.00
最終ジャッジ日時 2023-09-23 19:47:47
合計ジャッジ時間 4,816 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
23,400 KB
testcase_01 AC 56 ms
23,664 KB
testcase_02 AC 57 ms
23,976 KB
testcase_03 AC 57 ms
23,304 KB
testcase_04 AC 56 ms
24,204 KB
testcase_05 AC 57 ms
23,292 KB
testcase_06 AC 57 ms
23,304 KB
testcase_07 AC 57 ms
23,292 KB
testcase_08 AC 57 ms
23,880 KB
testcase_09 AC 57 ms
23,652 KB
testcase_10 AC 57 ms
24,216 KB
testcase_11 AC 57 ms
24,192 KB
testcase_12 AC 57 ms
23,544 KB
testcase_13 AC 57 ms
23,892 KB
testcase_14 AC 57 ms
23,412 KB
testcase_15 AC 58 ms
24,240 KB
testcase_16 AC 56 ms
23,544 KB
testcase_17 AC 56 ms
23,892 KB
testcase_18 AC 56 ms
24,240 KB
testcase_19 AC 57 ms
24,288 KB
testcase_20 AC 57 ms
23,532 KB
testcase_21 AC 56 ms
24,048 KB
testcase_22 AC 58 ms
23,676 KB
testcase_23 AC 57 ms
23,376 KB
testcase_24 AC 58 ms
23,640 KB
testcase_25 AC 57 ms
23,256 KB
testcase_26 AC 58 ms
23,412 KB
testcase_27 AC 58 ms
24,192 KB
testcase_28 AC 59 ms
23,412 KB
testcase_29 AC 57 ms
23,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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