結果

問題 No.246 質問と回答
ユーザー lloyzlloyz
提出日時 2023-03-29 00:06:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 102 ms / 2,000 ms
コード長 176 bytes
コンパイル時間 447 ms
コンパイル使用メモリ 81,900 KB
実行使用メモリ 69,960 KB
平均クエリ数 30.90
最終ジャッジ日時 2023-10-20 16:48:51
合計ジャッジ時間 5,378 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 102 ms
69,960 KB
testcase_01 AC 92 ms
69,960 KB
testcase_02 AC 92 ms
69,960 KB
testcase_03 AC 90 ms
69,960 KB
testcase_04 AC 93 ms
69,960 KB
testcase_05 AC 95 ms
69,960 KB
testcase_06 AC 93 ms
69,960 KB
testcase_07 AC 94 ms
69,960 KB
testcase_08 AC 93 ms
69,960 KB
testcase_09 AC 93 ms
69,960 KB
testcase_10 AC 94 ms
69,960 KB
testcase_11 AC 94 ms
69,960 KB
testcase_12 AC 94 ms
69,960 KB
testcase_13 AC 93 ms
69,960 KB
testcase_14 AC 93 ms
69,960 KB
testcase_15 AC 92 ms
69,960 KB
testcase_16 AC 91 ms
69,960 KB
testcase_17 AC 94 ms
69,960 KB
testcase_18 AC 93 ms
69,960 KB
testcase_19 AC 94 ms
69,960 KB
testcase_20 AC 96 ms
69,960 KB
testcase_21 AC 93 ms
69,960 KB
testcase_22 AC 92 ms
69,960 KB
testcase_23 AC 92 ms
69,960 KB
testcase_24 AC 92 ms
69,960 KB
testcase_25 AC 93 ms
69,960 KB
testcase_26 AC 92 ms
69,960 KB
testcase_27 AC 93 ms
69,960 KB
testcase_28 AC 91 ms
69,960 KB
testcase_29 AC 89 ms
69,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

l, r = 1, 10**9 + 1
while r - l > 1:
    mid = (l + r) // 2
    print(f"? {mid}")
    x = int(input())
    if x == 1:
        l = mid
    else:
        r = mid
print(f"! {l}")
0