結果

問題 No.1187 皇帝ペンギン
ユーザー qumazakiqumazaki
提出日時 2020-09-12 02:39:36
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 93 ms / 1,000 ms
コード長 419 bytes
コンパイル時間 278 ms
コンパイル使用メモリ 87,140 KB
実行使用メモリ 87,632 KB
平均クエリ数 25.00
最終ジャッジ日時 2023-09-24 06:38:55
合計ジャッジ時間 7,261 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
87,468 KB
testcase_01 AC 82 ms
87,612 KB
testcase_02 AC 88 ms
87,392 KB
testcase_03 AC 93 ms
87,484 KB
testcase_04 AC 85 ms
86,996 KB
testcase_05 AC 81 ms
87,592 KB
testcase_06 AC 82 ms
86,888 KB
testcase_07 AC 80 ms
87,200 KB
testcase_08 AC 82 ms
87,292 KB
testcase_09 AC 85 ms
87,352 KB
testcase_10 AC 85 ms
87,312 KB
testcase_11 AC 82 ms
86,828 KB
testcase_12 AC 84 ms
87,412 KB
testcase_13 AC 82 ms
86,860 KB
testcase_14 AC 84 ms
87,164 KB
testcase_15 AC 82 ms
86,844 KB
testcase_16 AC 82 ms
86,976 KB
testcase_17 AC 81 ms
87,060 KB
testcase_18 AC 82 ms
86,936 KB
testcase_19 AC 82 ms
87,080 KB
testcase_20 AC 79 ms
87,168 KB
testcase_21 AC 81 ms
87,576 KB
testcase_22 AC 81 ms
87,240 KB
testcase_23 AC 83 ms
87,088 KB
testcase_24 AC 81 ms
87,576 KB
testcase_25 AC 81 ms
87,132 KB
testcase_26 AC 85 ms
86,960 KB
testcase_27 AC 83 ms
87,132 KB
testcase_28 AC 82 ms
86,924 KB
testcase_29 AC 84 ms
86,688 KB
testcase_30 AC 81 ms
87,536 KB
testcase_31 AC 83 ms
87,252 KB
testcase_32 AC 82 ms
87,444 KB
testcase_33 AC 84 ms
87,240 KB
testcase_34 AC 84 ms
87,044 KB
testcase_35 AC 85 ms
87,632 KB
testcase_36 AC 86 ms
87,164 KB
testcase_37 AC 85 ms
87,100 KB
testcase_38 AC 83 ms
86,908 KB
testcase_39 AC 81 ms
87,392 KB
testcase_40 AC 83 ms
87,028 KB
testcase_41 AC 82 ms
87,596 KB
testcase_42 AC 81 ms
87,252 KB
testcase_43 AC 85 ms
86,928 KB
testcase_44 AC 85 ms
86,936 KB
testcase_45 AC 84 ms
87,012 KB
testcase_46 AC 83 ms
87,532 KB
testcase_47 AC 82 ms
87,564 KB
testcase_48 AC 85 ms
87,540 KB
testcase_49 AC 83 ms
87,096 KB
testcase_50 AC 81 ms
86,984 KB
testcase_51 AC 80 ms
87,136 KB
testcase_52 AC 82 ms
86,904 KB
testcase_53 AC 84 ms
86,888 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
iter = 1
ok = 0
ng = 1000
while iter <= 24:
    mid = (ok+ng)//2
    print ("? {}".format(mid))
    sys.stdout.flush()
    iter += 1
    res = input()
    if(res == 'safe'):
        ok = mid
        continue

    print ("? {}".format(mid+1))
    sys.stdout.flush()
    iter += 1
    res = input()
    if(res=='safe'):
        ok = mid+1
    else:
        ng = mid

print("! {}".format(ok))
sys.stdout.flush()
0