結果

問題 No.253 ロウソクの長さ
ユーザー eitahoeitaho
提出日時 2015-08-20 23:03:04
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 45 ms / 2,000 ms
コード長 524 bytes
コンパイル時間 77 ms
コンパイル使用メモリ 10,840 KB
実行使用メモリ 24,396 KB
平均クエリ数 34.94
最終ジャッジ日時 2023-09-23 21:20:28
合計ジャッジ時間 3,826 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
24,252 KB
testcase_01 AC 41 ms
23,568 KB
testcase_02 AC 44 ms
23,880 KB
testcase_03 AC 41 ms
24,288 KB
testcase_04 AC 41 ms
24,396 KB
testcase_05 AC 43 ms
23,796 KB
testcase_06 AC 41 ms
24,048 KB
testcase_07 AC 42 ms
23,772 KB
testcase_08 AC 42 ms
23,656 KB
testcase_09 AC 40 ms
23,800 KB
testcase_10 AC 41 ms
24,060 KB
testcase_11 AC 42 ms
23,868 KB
testcase_12 AC 42 ms
24,312 KB
testcase_13 AC 43 ms
23,664 KB
testcase_14 AC 41 ms
24,312 KB
testcase_15 AC 43 ms
24,084 KB
testcase_16 AC 41 ms
23,584 KB
testcase_17 AC 41 ms
23,768 KB
testcase_18 AC 41 ms
24,060 KB
testcase_19 AC 40 ms
23,452 KB
testcase_20 AC 42 ms
24,084 KB
testcase_21 AC 42 ms
23,692 KB
testcase_22 AC 41 ms
23,356 KB
testcase_23 AC 41 ms
23,868 KB
testcase_24 AC 43 ms
24,324 KB
testcase_25 AC 41 ms
24,348 KB
testcase_26 AC 41 ms
24,060 KB
testcase_27 AC 42 ms
24,312 KB
testcase_28 AC 42 ms
24,084 KB
testcase_29 AC 42 ms
23,760 KB
testcase_30 AC 41 ms
23,568 KB
testcase_31 AC 41 ms
23,532 KB
testcase_32 AC 41 ms
24,036 KB
testcase_33 AC 41 ms
24,372 KB
testcase_34 AC 41 ms
23,676 KB
testcase_35 AC 42 ms
23,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

print("? 99")
S = input()
count = 0

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