結果

問題 No.253 ロウソクの長さ
ユーザー eitahoeitaho
提出日時 2017-10-29 00:46:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 44 ms / 2,000 ms
コード長 596 bytes
コンパイル時間 176 ms
コンパイル使用メモリ 10,948 KB
実行使用メモリ 24,312 KB
平均クエリ数 34.94
最終ジャッジ日時 2023-09-24 01:35:26
合計ジャッジ時間 3,604 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
24,264 KB
testcase_01 AC 40 ms
24,252 KB
testcase_02 AC 41 ms
24,048 KB
testcase_03 AC 39 ms
23,928 KB
testcase_04 AC 39 ms
23,484 KB
testcase_05 AC 41 ms
23,368 KB
testcase_06 AC 44 ms
23,988 KB
testcase_07 AC 39 ms
23,496 KB
testcase_08 AC 39 ms
23,408 KB
testcase_09 AC 38 ms
23,952 KB
testcase_10 AC 40 ms
23,952 KB
testcase_11 AC 39 ms
23,736 KB
testcase_12 AC 39 ms
23,952 KB
testcase_13 AC 39 ms
23,760 KB
testcase_14 AC 39 ms
23,760 KB
testcase_15 AC 42 ms
23,576 KB
testcase_16 AC 40 ms
23,616 KB
testcase_17 AC 39 ms
23,500 KB
testcase_18 AC 39 ms
23,628 KB
testcase_19 AC 38 ms
24,036 KB
testcase_20 AC 38 ms
23,348 KB
testcase_21 AC 39 ms
24,108 KB
testcase_22 AC 39 ms
23,436 KB
testcase_23 AC 39 ms
23,488 KB
testcase_24 AC 41 ms
23,380 KB
testcase_25 AC 39 ms
24,252 KB
testcase_26 AC 40 ms
23,388 KB
testcase_27 AC 40 ms
24,252 KB
testcase_28 AC 38 ms
24,312 KB
testcase_29 AC 39 ms
24,252 KB
testcase_30 AC 39 ms
23,380 KB
testcase_31 AC 39 ms
24,300 KB
testcase_32 AC 40 ms
23,604 KB
testcase_33 AC 39 ms
24,264 KB
testcase_34 AC 38 ms
23,928 KB
testcase_35 AC 40 ms
24,192 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

print("? 99", flush=True)
S = input()
count = 0

if S == "0":
    print("! 99", flush=True)
elif S == "-1":
    while 1:
        print("? 0", flush=True)
        S = input()
        count += 1
        if S == "0":
            print("!", count, flush=True)
            break
else:
    L = 99
    R = int(1e9) + 1
    while 1:
        mid = (L + R) // 2
        print("?", mid - 1 - count, flush=True)
        S = input()
        if S == "0":
            print("!", mid, flush=True)
            break
        elif S == "-1":
            R = mid
        else:
            L = mid
        count += 1
0