結果

問題 No.253 ロウソクの長さ
ユーザー 👑 rin204rin204
提出日時 2022-11-02 16:41:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 92 ms / 2,000 ms
コード長 461 bytes
コンパイル時間 286 ms
コンパイル使用メモリ 86,996 KB
実行使用メモリ 87,676 KB
平均クエリ数 35.67
最終ジャッジ日時 2023-09-24 03:08:07
合計ジャッジ時間 5,602 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
87,676 KB
testcase_01 AC 85 ms
87,160 KB
testcase_02 AC 85 ms
86,812 KB
testcase_03 AC 83 ms
87,424 KB
testcase_04 AC 82 ms
87,336 KB
testcase_05 AC 86 ms
87,328 KB
testcase_06 AC 82 ms
87,256 KB
testcase_07 AC 85 ms
87,160 KB
testcase_08 AC 83 ms
87,056 KB
testcase_09 AC 83 ms
87,344 KB
testcase_10 AC 81 ms
87,076 KB
testcase_11 AC 92 ms
86,972 KB
testcase_12 AC 84 ms
87,384 KB
testcase_13 AC 84 ms
87,072 KB
testcase_14 AC 82 ms
87,104 KB
testcase_15 AC 88 ms
86,740 KB
testcase_16 AC 83 ms
87,388 KB
testcase_17 AC 86 ms
87,024 KB
testcase_18 AC 84 ms
86,828 KB
testcase_19 AC 86 ms
87,228 KB
testcase_20 AC 84 ms
87,200 KB
testcase_21 AC 84 ms
87,052 KB
testcase_22 AC 84 ms
87,424 KB
testcase_23 AC 86 ms
86,900 KB
testcase_24 AC 86 ms
87,328 KB
testcase_25 AC 83 ms
87,460 KB
testcase_26 AC 85 ms
87,008 KB
testcase_27 AC 85 ms
87,216 KB
testcase_28 AC 84 ms
87,400 KB
testcase_29 AC 83 ms
87,124 KB
testcase_30 AC 85 ms
87,392 KB
testcase_31 AC 85 ms
87,380 KB
testcase_32 AC 84 ms
87,016 KB
testcase_33 AC 88 ms
87,280 KB
testcase_34 AC 86 ms
87,532 KB
testcase_35 AC 86 ms
86,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def ask(x):
    print("?", x, flush=True)
    return int(input())


x = ask(98)
if x == 0:
    print("!", 98, flush=True)
elif x == -1:
    for i in range(1, 99):
        if ask(0) == 0:
            print("!", i, flush=True)
            break
else:
    l = 0
    r = 1 << 30
    t = 1
    while r - l > 1:
        mid = (l + r) // 2
        if ask(mid - t) >= 0:
            l = mid
        else:
            r = mid
        t += 1
    print("!", l, flush=True)
0