結果

問題 No.246 質問と回答
ユーザー NatsubiSoganNatsubiSogan
提出日時 2020-08-20 13:23:24
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 218 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 10,604 KB
実行使用メモリ 24,480 KB
平均クエリ数 30.30
最終ジャッジ日時 2023-09-24 05:43:19
合計ジャッジ時間 3,175 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
23,988 KB
testcase_01 WA -
testcase_02 AC 45 ms
23,640 KB
testcase_03 AC 45 ms
23,568 KB
testcase_04 AC 47 ms
23,624 KB
testcase_05 WA -
testcase_06 AC 50 ms
23,556 KB
testcase_07 AC 46 ms
24,300 KB
testcase_08 AC 50 ms
23,516 KB
testcase_09 WA -
testcase_10 AC 48 ms
23,484 KB
testcase_11 WA -
testcase_12 AC 47 ms
23,928 KB
testcase_13 AC 47 ms
23,528 KB
testcase_14 AC 46 ms
23,472 KB
testcase_15 WA -
testcase_16 AC 47 ms
23,328 KB
testcase_17 AC 47 ms
23,760 KB
testcase_18 AC 50 ms
24,012 KB
testcase_19 AC 51 ms
23,500 KB
testcase_20 AC 49 ms
23,644 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 45 ms
23,596 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 47 ms
23,616 KB
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
l, r = 1, 10 ** 9
while r - l > 1:
    m = (l + r) // 2
    print("?", m)
    sys.stdout.flush()
    n = int(input())
    if n == 1:
        l = m
    else:
        r = m - 1
print("!", r)
sys.stdout.flush()
0