結果

問題 No.1187 皇帝ペンギン
ユーザー boutarouboutarou
提出日時 2020-08-24 21:07:34
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 52 ms / 1,000 ms
コード長 364 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 10,664 KB
実行使用メモリ 24,376 KB
平均クエリ数 16.56
最終ジャッジ日時 2023-09-24 06:26:59
合計ジャッジ時間 5,422 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
23,444 KB
testcase_01 AC 41 ms
24,000 KB
testcase_02 AC 41 ms
23,520 KB
testcase_03 AC 42 ms
24,228 KB
testcase_04 AC 42 ms
23,976 KB
testcase_05 AC 43 ms
23,656 KB
testcase_06 AC 47 ms
23,988 KB
testcase_07 AC 43 ms
23,568 KB
testcase_08 AC 43 ms
23,344 KB
testcase_09 AC 44 ms
23,752 KB
testcase_10 AC 43 ms
23,640 KB
testcase_11 AC 42 ms
23,704 KB
testcase_12 AC 41 ms
24,012 KB
testcase_13 AC 41 ms
23,388 KB
testcase_14 AC 42 ms
23,708 KB
testcase_15 AC 42 ms
23,980 KB
testcase_16 AC 42 ms
23,324 KB
testcase_17 AC 43 ms
23,760 KB
testcase_18 AC 42 ms
24,196 KB
testcase_19 AC 43 ms
23,416 KB
testcase_20 AC 43 ms
24,324 KB
testcase_21 AC 42 ms
23,568 KB
testcase_22 AC 42 ms
24,000 KB
testcase_23 AC 42 ms
23,344 KB
testcase_24 AC 42 ms
23,812 KB
testcase_25 AC 41 ms
23,344 KB
testcase_26 AC 41 ms
23,764 KB
testcase_27 AC 42 ms
23,360 KB
testcase_28 AC 41 ms
23,980 KB
testcase_29 AC 42 ms
23,652 KB
testcase_30 AC 42 ms
23,720 KB
testcase_31 AC 43 ms
23,796 KB
testcase_32 AC 43 ms
23,688 KB
testcase_33 AC 43 ms
23,740 KB
testcase_34 AC 42 ms
24,240 KB
testcase_35 AC 42 ms
23,760 KB
testcase_36 AC 41 ms
23,484 KB
testcase_37 AC 41 ms
23,732 KB
testcase_38 AC 42 ms
23,844 KB
testcase_39 AC 41 ms
23,976 KB
testcase_40 AC 41 ms
24,324 KB
testcase_41 AC 42 ms
24,376 KB
testcase_42 AC 42 ms
24,204 KB
testcase_43 AC 42 ms
23,568 KB
testcase_44 AC 42 ms
23,668 KB
testcase_45 AC 42 ms
23,772 KB
testcase_46 AC 41 ms
24,336 KB
testcase_47 AC 42 ms
23,764 KB
testcase_48 AC 41 ms
23,684 KB
testcase_49 AC 41 ms
23,640 KB
testcase_50 AC 41 ms
23,528 KB
testcase_51 AC 42 ms
23,992 KB
testcase_52 AC 42 ms
23,472 KB
testcase_53 AC 41 ms
24,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ok = 0
ng = 1000

while((ng - ok) > 1):
    mid = (ok + ng) // 2
    print("?", mid, flush = True)
    res = input()
    if (res == "safe"):
        ok = mid
        continue
    else:
        print("?", mid + 1, flush = True)
        res2 = input()
        if (res2 == "out"):
            ng = mid
        else:
            ok = mid

print("!", ok, flush = True)
0