結果

問題 No.1187 皇帝ペンギン
ユーザー lloyzlloyz
提出日時 2023-04-17 00:00:59
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 57 ms / 1,000 ms
コード長 324 bytes
コンパイル時間 392 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 27,600 KB
平均クエリ数 16.44
最終ジャッジ日時 2024-04-20 09:42:48
合計ジャッジ時間 6,772 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
27,208 KB
testcase_01 AC 54 ms
27,208 KB
testcase_02 AC 54 ms
27,208 KB
testcase_03 AC 54 ms
27,208 KB
testcase_04 AC 55 ms
26,824 KB
testcase_05 AC 53 ms
27,208 KB
testcase_06 AC 54 ms
26,952 KB
testcase_07 AC 53 ms
27,208 KB
testcase_08 AC 53 ms
26,696 KB
testcase_09 AC 53 ms
27,208 KB
testcase_10 AC 54 ms
26,960 KB
testcase_11 AC 53 ms
26,968 KB
testcase_12 AC 54 ms
27,080 KB
testcase_13 AC 54 ms
26,952 KB
testcase_14 AC 53 ms
27,208 KB
testcase_15 AC 53 ms
27,336 KB
testcase_16 AC 53 ms
27,592 KB
testcase_17 AC 55 ms
27,336 KB
testcase_18 AC 53 ms
27,208 KB
testcase_19 AC 55 ms
26,696 KB
testcase_20 AC 53 ms
27,284 KB
testcase_21 AC 53 ms
26,704 KB
testcase_22 AC 55 ms
27,088 KB
testcase_23 AC 54 ms
27,344 KB
testcase_24 AC 55 ms
27,344 KB
testcase_25 AC 55 ms
26,960 KB
testcase_26 AC 54 ms
26,960 KB
testcase_27 AC 54 ms
26,960 KB
testcase_28 AC 53 ms
26,960 KB
testcase_29 AC 55 ms
27,600 KB
testcase_30 AC 55 ms
27,216 KB
testcase_31 AC 54 ms
26,960 KB
testcase_32 AC 55 ms
27,208 KB
testcase_33 AC 55 ms
26,832 KB
testcase_34 AC 54 ms
27,216 KB
testcase_35 AC 54 ms
27,088 KB
testcase_36 AC 55 ms
26,960 KB
testcase_37 AC 54 ms
27,216 KB
testcase_38 AC 54 ms
27,088 KB
testcase_39 AC 53 ms
27,344 KB
testcase_40 AC 53 ms
27,088 KB
testcase_41 AC 54 ms
26,968 KB
testcase_42 AC 53 ms
27,224 KB
testcase_43 AC 54 ms
27,096 KB
testcase_44 AC 55 ms
27,096 KB
testcase_45 AC 52 ms
27,224 KB
testcase_46 AC 53 ms
26,968 KB
testcase_47 AC 54 ms
26,952 KB
testcase_48 AC 53 ms
27,080 KB
testcase_49 AC 53 ms
26,952 KB
testcase_50 AC 53 ms
27,080 KB
testcase_51 AC 53 ms
27,112 KB
testcase_52 AC 52 ms
27,216 KB
testcase_53 AC 53 ms
26,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ok, ng = 0, 10**3 + 1
while ng - ok > 1:
    mid = (ok + ng) // 2
    print(f"? {mid}")
    s = input()
    if s == "safe":
        ok = mid
    elif s == "out":
        print(f"? {mid + 1}")
        s = input()
        if s == "safe":
            ok = mid + 1
        elif s == "out":
            ng = mid
print(f"! {ok}")
0