結果

問題 No.1187 皇帝ペンギン
ユーザー tyawanmusityawanmusi
提出日時 2020-08-22 17:49:56
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 39 ms / 1,000 ms
コード長 254 bytes
コンパイル時間 153 ms
コンパイル使用メモリ 10,588 KB
実行使用メモリ 24,384 KB
平均クエリ数 19.67
最終ジャッジ日時 2023-09-24 06:18:11
合計ジャッジ時間 4,739 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
23,988 KB
testcase_01 AC 39 ms
23,400 KB
testcase_02 AC 32 ms
23,784 KB
testcase_03 AC 33 ms
23,492 KB
testcase_04 AC 31 ms
23,696 KB
testcase_05 AC 32 ms
24,004 KB
testcase_06 AC 30 ms
24,012 KB
testcase_07 AC 31 ms
24,012 KB
testcase_08 AC 31 ms
23,760 KB
testcase_09 AC 33 ms
24,016 KB
testcase_10 AC 36 ms
24,040 KB
testcase_11 AC 31 ms
23,676 KB
testcase_12 AC 33 ms
24,012 KB
testcase_13 AC 32 ms
23,724 KB
testcase_14 AC 32 ms
23,652 KB
testcase_15 AC 31 ms
23,616 KB
testcase_16 AC 29 ms
23,464 KB
testcase_17 AC 32 ms
23,352 KB
testcase_18 AC 31 ms
23,992 KB
testcase_19 AC 30 ms
23,516 KB
testcase_20 AC 30 ms
23,724 KB
testcase_21 AC 31 ms
24,024 KB
testcase_22 AC 31 ms
24,228 KB
testcase_23 AC 32 ms
24,004 KB
testcase_24 AC 32 ms
23,404 KB
testcase_25 AC 32 ms
23,704 KB
testcase_26 AC 31 ms
23,476 KB
testcase_27 AC 32 ms
23,660 KB
testcase_28 AC 32 ms
24,052 KB
testcase_29 AC 32 ms
23,976 KB
testcase_30 AC 32 ms
24,024 KB
testcase_31 AC 30 ms
23,736 KB
testcase_32 AC 32 ms
24,384 KB
testcase_33 AC 32 ms
23,796 KB
testcase_34 AC 31 ms
23,612 KB
testcase_35 AC 30 ms
23,592 KB
testcase_36 AC 30 ms
23,988 KB
testcase_37 AC 31 ms
24,384 KB
testcase_38 AC 31 ms
23,604 KB
testcase_39 AC 31 ms
23,356 KB
testcase_40 AC 31 ms
23,980 KB
testcase_41 AC 32 ms
24,364 KB
testcase_42 AC 31 ms
24,000 KB
testcase_43 AC 31 ms
23,976 KB
testcase_44 AC 31 ms
24,372 KB
testcase_45 AC 31 ms
24,048 KB
testcase_46 AC 32 ms
23,660 KB
testcase_47 AC 33 ms
23,560 KB
testcase_48 AC 32 ms
24,360 KB
testcase_49 AC 32 ms
24,364 KB
testcase_50 AC 32 ms
24,372 KB
testcase_51 AC 32 ms
23,980 KB
testcase_52 AC 32 ms
24,348 KB
testcase_53 AC 32 ms
23,480 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def query(n):
  print("?",n,flush=True)
  return input()=="safe"
ok=0
ng=10**3
while ok+1!=ng:
  mid=(ok+ng)//2
  ans1=query(mid)
  ans2=query(mid+1)
  if ans1==ans2==False:
    ng=mid
  elif ans2:
    ok=mid+1
  else:
    ok=mid
print("!",ok,flush=True)
0