結果

問題 No.1187 皇帝ペンギン
ユーザー 👑 KazunKazun
提出日時 2020-08-22 15:19:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 95 ms / 1,000 ms
コード長 386 bytes
コンパイル時間 303 ms
コンパイル使用メモリ 87,224 KB
実行使用メモリ 87,700 KB
平均クエリ数 16.48
最終ジャッジ日時 2023-09-24 06:08:57
合計ジャッジ時間 8,015 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
87,312 KB
testcase_01 AC 84 ms
87,124 KB
testcase_02 AC 81 ms
87,148 KB
testcase_03 AC 80 ms
86,968 KB
testcase_04 AC 80 ms
87,152 KB
testcase_05 AC 82 ms
86,908 KB
testcase_06 AC 86 ms
87,700 KB
testcase_07 AC 88 ms
87,052 KB
testcase_08 AC 83 ms
86,956 KB
testcase_09 AC 80 ms
87,528 KB
testcase_10 AC 82 ms
87,232 KB
testcase_11 AC 85 ms
87,480 KB
testcase_12 AC 85 ms
87,148 KB
testcase_13 AC 81 ms
87,344 KB
testcase_14 AC 84 ms
87,328 KB
testcase_15 AC 86 ms
87,256 KB
testcase_16 AC 85 ms
87,672 KB
testcase_17 AC 88 ms
87,140 KB
testcase_18 AC 86 ms
87,244 KB
testcase_19 AC 82 ms
87,176 KB
testcase_20 AC 81 ms
87,460 KB
testcase_21 AC 81 ms
87,328 KB
testcase_22 AC 83 ms
87,584 KB
testcase_23 AC 85 ms
87,140 KB
testcase_24 AC 82 ms
87,648 KB
testcase_25 AC 80 ms
87,036 KB
testcase_26 AC 84 ms
87,300 KB
testcase_27 AC 84 ms
87,556 KB
testcase_28 AC 80 ms
87,636 KB
testcase_29 AC 79 ms
86,992 KB
testcase_30 AC 80 ms
87,224 KB
testcase_31 AC 84 ms
87,680 KB
testcase_32 AC 85 ms
87,332 KB
testcase_33 AC 88 ms
87,268 KB
testcase_34 AC 83 ms
87,588 KB
testcase_35 AC 82 ms
87,108 KB
testcase_36 AC 86 ms
87,044 KB
testcase_37 AC 80 ms
87,616 KB
testcase_38 AC 81 ms
87,616 KB
testcase_39 AC 83 ms
86,860 KB
testcase_40 AC 85 ms
87,068 KB
testcase_41 AC 84 ms
87,156 KB
testcase_42 AC 79 ms
86,960 KB
testcase_43 AC 83 ms
87,096 KB
testcase_44 AC 81 ms
87,272 KB
testcase_45 AC 95 ms
87,032 KB
testcase_46 AC 89 ms
87,028 KB
testcase_47 AC 82 ms
87,012 KB
testcase_48 AC 85 ms
87,140 KB
testcase_49 AC 84 ms
87,040 KB
testcase_50 AC 82 ms
86,984 KB
testcase_51 AC 83 ms
87,068 KB
testcase_52 AC 80 ms
87,248 KB
testcase_53 AC 81 ms
86,932 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def Question(X):
    print("? {}".format(X),flush=True)
    return input()=="safe"

def Answer(X):
    print("! {}".format(X),flush=True)
    exit()
#==============================================
L,R=0,1001

while R-L>1:
    C=L+(R-L)//2
    p=Question(C)
    if not p:
        q=Question(C+1)
        if q:
            L=C
        else:
            R=C
    else:
        L=C
Answer(L)
0