結果

問題 No.246 質問と回答
ユーザー 👑 KazunKazun
提出日時 2020-05-31 17:08:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 117 ms / 2,000 ms
コード長 248 bytes
コンパイル時間 1,609 ms
コンパイル使用メモリ 87,080 KB
実行使用メモリ 87,564 KB
平均クエリ数 30.90
最終ジャッジ日時 2023-09-23 20:35:15
合計ジャッジ時間 5,978 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
87,028 KB
testcase_01 AC 111 ms
87,284 KB
testcase_02 AC 112 ms
87,436 KB
testcase_03 AC 112 ms
87,136 KB
testcase_04 AC 110 ms
86,908 KB
testcase_05 AC 115 ms
86,968 KB
testcase_06 AC 112 ms
87,012 KB
testcase_07 AC 112 ms
86,692 KB
testcase_08 AC 114 ms
87,252 KB
testcase_09 AC 113 ms
86,996 KB
testcase_10 AC 111 ms
86,752 KB
testcase_11 AC 115 ms
86,952 KB
testcase_12 AC 114 ms
87,400 KB
testcase_13 AC 113 ms
86,916 KB
testcase_14 AC 115 ms
87,272 KB
testcase_15 AC 115 ms
87,216 KB
testcase_16 AC 113 ms
87,008 KB
testcase_17 AC 116 ms
86,736 KB
testcase_18 AC 114 ms
87,280 KB
testcase_19 AC 115 ms
87,564 KB
testcase_20 AC 115 ms
87,368 KB
testcase_21 AC 113 ms
86,996 KB
testcase_22 AC 115 ms
87,212 KB
testcase_23 AC 111 ms
87,476 KB
testcase_24 AC 114 ms
87,512 KB
testcase_25 AC 112 ms
87,068 KB
testcase_26 AC 110 ms
87,208 KB
testcase_27 AC 111 ms
87,128 KB
testcase_28 AC 108 ms
87,360 KB
testcase_29 AC 109 ms
86,988 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

def m(L,U):
    return (L+U+1)//2

L=1
U=10**9

while L!=U:
    M=m(L,U)
    print("? {} [{},{}]".format(M,L,U))
    sys.stdout.flush()

    r=int(input())
    if r==1:
        L=M
    else:
        U=M-1

print("! {}".format(L))
exit()
0