結果

問題 No.1187 皇帝ペンギン
ユーザー H3PO4H3PO4
提出日時 2021-11-12 09:01:42
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 47 ms / 1,000 ms
コード長 253 bytes
コンパイル時間 412 ms
コンパイル使用メモリ 10,516 KB
実行使用メモリ 24,480 KB
平均クエリ数 16.48
最終ジャッジ日時 2023-08-16 05:12:20
合計ジャッジ時間 7,804 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
23,836 KB
testcase_01 AC 44 ms
23,584 KB
testcase_02 AC 41 ms
23,520 KB
testcase_03 AC 40 ms
24,016 KB
testcase_04 AC 41 ms
24,324 KB
testcase_05 AC 40 ms
23,748 KB
testcase_06 AC 41 ms
23,480 KB
testcase_07 AC 41 ms
23,740 KB
testcase_08 AC 40 ms
23,688 KB
testcase_09 AC 40 ms
23,472 KB
testcase_10 AC 41 ms
24,456 KB
testcase_11 AC 40 ms
24,036 KB
testcase_12 AC 41 ms
23,812 KB
testcase_13 AC 40 ms
23,580 KB
testcase_14 AC 41 ms
24,192 KB
testcase_15 AC 42 ms
24,300 KB
testcase_16 AC 40 ms
23,448 KB
testcase_17 AC 40 ms
23,616 KB
testcase_18 AC 40 ms
24,036 KB
testcase_19 AC 40 ms
23,648 KB
testcase_20 AC 41 ms
23,616 KB
testcase_21 AC 40 ms
24,300 KB
testcase_22 AC 40 ms
24,024 KB
testcase_23 AC 41 ms
24,324 KB
testcase_24 AC 42 ms
23,544 KB
testcase_25 AC 43 ms
24,016 KB
testcase_26 AC 41 ms
23,664 KB
testcase_27 AC 41 ms
23,604 KB
testcase_28 AC 40 ms
24,028 KB
testcase_29 AC 40 ms
23,640 KB
testcase_30 AC 40 ms
24,004 KB
testcase_31 AC 40 ms
24,256 KB
testcase_32 AC 40 ms
24,196 KB
testcase_33 AC 40 ms
24,312 KB
testcase_34 AC 41 ms
23,496 KB
testcase_35 AC 40 ms
24,480 KB
testcase_36 AC 40 ms
23,528 KB
testcase_37 AC 40 ms
23,556 KB
testcase_38 AC 40 ms
23,640 KB
testcase_39 AC 41 ms
23,672 KB
testcase_40 AC 40 ms
24,024 KB
testcase_41 AC 41 ms
23,452 KB
testcase_42 AC 41 ms
23,808 KB
testcase_43 AC 41 ms
23,504 KB
testcase_44 AC 41 ms
23,696 KB
testcase_45 AC 42 ms
24,360 KB
testcase_46 AC 41 ms
24,024 KB
testcase_47 AC 41 ms
23,536 KB
testcase_48 AC 41 ms
24,300 KB
testcase_49 AC 42 ms
23,448 KB
testcase_50 AC 40 ms
24,376 KB
testcase_51 AC 41 ms
23,352 KB
testcase_52 AC 43 ms
23,588 KB
testcase_53 AC 41 ms
24,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def question(x):
    print(f"? {x}", flush=True)
    return input() == 'safe'


l, r = 0, 1000
while (r - l) > 1:
    m = (r + l) // 2
    if question(m):
        l = m
    elif question(m + 1):
        l = m + 1
    else:
        r = m
print(f"! {l}")
0