結果

問題 No.1187 皇帝ペンギン
ユーザー roarisroaris
提出日時 2020-08-22 17:20:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 101 ms / 1,000 ms
コード長 445 bytes
コンパイル時間 374 ms
コンパイル使用メモリ 87,060 KB
実行使用メモリ 87,772 KB
平均クエリ数 21.33
最終ジャッジ日時 2023-09-24 06:17:30
合計ジャッジ時間 8,631 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 101 ms
87,676 KB
testcase_01 AC 97 ms
87,028 KB
testcase_02 AC 96 ms
86,684 KB
testcase_03 AC 97 ms
87,064 KB
testcase_04 AC 97 ms
86,916 KB
testcase_05 AC 98 ms
87,044 KB
testcase_06 AC 97 ms
87,204 KB
testcase_07 AC 97 ms
87,432 KB
testcase_08 AC 96 ms
86,812 KB
testcase_09 AC 96 ms
87,180 KB
testcase_10 AC 97 ms
87,256 KB
testcase_11 AC 97 ms
87,032 KB
testcase_12 AC 97 ms
87,624 KB
testcase_13 AC 96 ms
87,384 KB
testcase_14 AC 96 ms
87,284 KB
testcase_15 AC 95 ms
87,484 KB
testcase_16 AC 95 ms
87,192 KB
testcase_17 AC 96 ms
86,808 KB
testcase_18 AC 95 ms
87,316 KB
testcase_19 AC 98 ms
87,256 KB
testcase_20 AC 95 ms
87,280 KB
testcase_21 AC 97 ms
87,140 KB
testcase_22 AC 99 ms
86,980 KB
testcase_23 AC 98 ms
87,264 KB
testcase_24 AC 97 ms
87,328 KB
testcase_25 AC 98 ms
87,168 KB
testcase_26 AC 98 ms
87,440 KB
testcase_27 AC 101 ms
87,168 KB
testcase_28 AC 97 ms
86,696 KB
testcase_29 AC 99 ms
87,124 KB
testcase_30 AC 98 ms
87,772 KB
testcase_31 AC 96 ms
86,824 KB
testcase_32 AC 96 ms
87,332 KB
testcase_33 AC 97 ms
86,812 KB
testcase_34 AC 97 ms
87,132 KB
testcase_35 AC 98 ms
87,240 KB
testcase_36 AC 97 ms
87,188 KB
testcase_37 AC 97 ms
87,392 KB
testcase_38 AC 97 ms
87,408 KB
testcase_39 AC 98 ms
87,324 KB
testcase_40 AC 97 ms
87,092 KB
testcase_41 AC 100 ms
87,256 KB
testcase_42 AC 99 ms
87,192 KB
testcase_43 AC 100 ms
87,200 KB
testcase_44 AC 100 ms
87,180 KB
testcase_45 AC 98 ms
87,068 KB
testcase_46 AC 98 ms
87,288 KB
testcase_47 AC 99 ms
87,288 KB
testcase_48 AC 97 ms
87,200 KB
testcase_49 AC 98 ms
87,336 KB
testcase_50 AC 99 ms
87,136 KB
testcase_51 AC 98 ms
87,404 KB
testcase_52 AC 99 ms
87,208 KB
testcase_53 AC 97 ms
86,688 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#N, D = 40, 5

def return_inp(x):
    if x>=N or x%D==0:
        return 'out'
    else:
        return 'safe'
        
def judge(m):
    #res1 = return_inp(m)
    print('?', m)
    res1 = input()
    #res2 = return_inp(m+1)
    print('?', m+1)
    res2 = input()
    return res1=='out' and res2=='out'
    
l, r = 1, 10**3+100
    
while l<=r:
    m = (l+r)//2
        
    if judge(m):
        r = m-1
    else:
        l = m+1

print('!', l-1)
0