結果
問題 |
No.1187 皇帝ペンギン
|
ユーザー |
![]() |
提出日時 | 2020-08-22 23:04:10 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 358 bytes |
コンパイル時間 | 170 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 27,736 KB |
平均クエリ数 | 16.56 |
最終ジャッジ日時 | 2024-07-17 06:40:39 |
合計ジャッジ時間 | 11,021 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 WA * 52 |
ソースコード
import sys input=lambda: sys.stdin.readline().rstrip() print("?",1,flush=True) res=input() if res=="out": print(0) sys.exit() else: l,r=1,1001 while r-l>1: mid=(l+r)//2 print("?",mid,flush=True) res=input() if res=="safe": l=mid else: print("?",mid+1,flush=True) if res=="safe": l=mid+1 else: r=mid print("!",l,flush=True)