結果

問題 No.1187 皇帝ペンギン
ユーザー titiatitia
提出日時 2020-08-22 13:09:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 331 bytes
コンパイル時間 115 ms
コンパイル使用メモリ 10,700 KB
実行使用メモリ 24,396 KB
平均クエリ数 21.56
最終ジャッジ日時 2023-09-24 05:50:47
合計ジャッジ時間 9,336 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
24,240 KB
testcase_01 AC 38 ms
23,476 KB
testcase_02 AC 31 ms
23,660 KB
testcase_03 WA -
testcase_04 AC 32 ms
23,728 KB
testcase_05 AC 31 ms
23,976 KB
testcase_06 AC 31 ms
23,640 KB
testcase_07 AC 32 ms
23,672 KB
testcase_08 WA -
testcase_09 AC 32 ms
23,788 KB
testcase_10 AC 32 ms
23,940 KB
testcase_11 WA -
testcase_12 AC 31 ms
23,628 KB
testcase_13 WA -
testcase_14 AC 31 ms
24,148 KB
testcase_15 AC 34 ms
23,588 KB
testcase_16 AC 32 ms
23,480 KB
testcase_17 WA -
testcase_18 AC 33 ms
23,468 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 40 ms
23,392 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 32 ms
23,476 KB
testcase_26 AC 41 ms
24,144 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 41 ms
23,620 KB
testcase_31 WA -
testcase_32 AC 41 ms
23,976 KB
testcase_33 AC 44 ms
23,988 KB
testcase_34 AC 32 ms
23,660 KB
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 AC 31 ms
23,504 KB
testcase_44 WA -
testcase_45 AC 33 ms
23,664 KB
testcase_46 WA -
testcase_47 AC 32 ms
24,324 KB
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
testcase_51 AC 31 ms
23,592 KB
testcase_52 AC 32 ms
23,724 KB
testcase_53 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

NG=10**3
OK=0

while NG-OK>1:
    mid=(OK+NG)//2
    print("?",mid,flush=True)

    if input().strip()=="safe":
        OK=mid
    else:
        print("?",mid-1,flush=True)

        if input().strip()=="safe":
            OK=mid-1
        else:
            NG=mid-1

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