結果

問題 No.246 質問と回答
ユーザー 👑 KazunKazun
提出日時 2020-05-31 16:58:02
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 227 bytes
コンパイル時間 1,995 ms
コンパイル使用メモリ 86,880 KB
実行使用メモリ 95,516 KB
平均クエリ数 72.80
最終ジャッジ日時 2023-09-24 03:38:08
合計ジャッジ時間 8,285 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
87,512 KB
testcase_01 RE -
testcase_02 RE -
testcase_03 AC 112 ms
87,172 KB
testcase_04 AC 110 ms
87,612 KB
testcase_05 RE -
testcase_06 AC 112 ms
87,188 KB
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 AC 112 ms
87,256 KB
testcase_11 RE -
testcase_12 AC 112 ms
87,272 KB
testcase_13 AC 110 ms
86,932 KB
testcase_14 AC 113 ms
87,268 KB
testcase_15 RE -
testcase_16 AC 112 ms
87,228 KB
testcase_17 RE -
testcase_18 AC 111 ms
87,452 KB
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 AC 112 ms
86,908 KB
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 AC 114 ms
87,260 KB
testcase_29 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

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

L=1
U=10**9

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

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

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