結果

問題 No.1187 皇帝ペンギン
ユーザー tktk_snsntktk_snsn
提出日時 2021-02-09 02:12:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 100 ms / 1,000 ms
コード長 375 bytes
コンパイル時間 319 ms
コンパイル使用メモリ 86,936 KB
実行使用メモリ 87,724 KB
平均クエリ数 18.44
最終ジャッジ日時 2023-09-24 09:44:09
合計ジャッジ時間 8,653 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 100 ms
87,508 KB
testcase_01 AC 98 ms
86,900 KB
testcase_02 AC 96 ms
86,908 KB
testcase_03 AC 96 ms
87,336 KB
testcase_04 AC 95 ms
87,180 KB
testcase_05 AC 97 ms
87,152 KB
testcase_06 AC 98 ms
87,160 KB
testcase_07 AC 95 ms
87,004 KB
testcase_08 AC 98 ms
86,852 KB
testcase_09 AC 98 ms
87,640 KB
testcase_10 AC 97 ms
87,352 KB
testcase_11 AC 97 ms
87,724 KB
testcase_12 AC 97 ms
87,632 KB
testcase_13 AC 97 ms
87,556 KB
testcase_14 AC 96 ms
87,232 KB
testcase_15 AC 97 ms
87,212 KB
testcase_16 AC 97 ms
87,180 KB
testcase_17 AC 97 ms
87,456 KB
testcase_18 AC 98 ms
87,040 KB
testcase_19 AC 100 ms
87,332 KB
testcase_20 AC 97 ms
87,256 KB
testcase_21 AC 99 ms
87,352 KB
testcase_22 AC 97 ms
86,828 KB
testcase_23 AC 99 ms
86,736 KB
testcase_24 AC 97 ms
87,324 KB
testcase_25 AC 99 ms
87,344 KB
testcase_26 AC 100 ms
87,584 KB
testcase_27 AC 98 ms
87,600 KB
testcase_28 AC 97 ms
87,144 KB
testcase_29 AC 98 ms
87,536 KB
testcase_30 AC 97 ms
87,148 KB
testcase_31 AC 98 ms
87,620 KB
testcase_32 AC 99 ms
87,320 KB
testcase_33 AC 97 ms
87,116 KB
testcase_34 AC 97 ms
87,348 KB
testcase_35 AC 97 ms
87,156 KB
testcase_36 AC 97 ms
87,144 KB
testcase_37 AC 99 ms
87,464 KB
testcase_38 AC 98 ms
87,396 KB
testcase_39 AC 98 ms
87,392 KB
testcase_40 AC 98 ms
87,348 KB
testcase_41 AC 99 ms
87,188 KB
testcase_42 AC 98 ms
86,708 KB
testcase_43 AC 97 ms
87,452 KB
testcase_44 AC 98 ms
87,068 KB
testcase_45 AC 97 ms
87,232 KB
testcase_46 AC 98 ms
86,916 KB
testcase_47 AC 97 ms
87,168 KB
testcase_48 AC 99 ms
87,580 KB
testcase_49 AC 98 ms
87,052 KB
testcase_50 AC 98 ms
87,136 KB
testcase_51 AC 98 ms
87,460 KB
testcase_52 AC 97 ms
87,216 KB
testcase_53 AC 97 ms
87,040 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

l = 0
r = 1001
while r - l > 1:
    m = (l + r) // 2
    print("? {}".format(m))
    s = input()
    if s == "safe":
        l = m
        continue
    print("? {}".format(m + 1))
    s = input()
    if s == "safe":
        l = m + 1
    else:
        r = m

while r >= 0:
    print("? {}".format(r))
    if input() == "safe":
        break
    r -= 1
print("! {}".format(r))
0