結果
問題 |
No.246 質問と回答
|
ユーザー |
![]() |
提出日時 | 2020-04-23 23:29:05 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 308 bytes |
コンパイル時間 | 215 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 27,768 KB |
平均クエリ数 | 1.00 |
最終ジャッジ日時 | 2024-07-17 03:28:28 |
合計ジャッジ時間 | 4,486 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 30 |
ソースコード
import sys input=lambda: sys.stdin.readline().rstrip() l,r=0,10**9+1 while r-l>1: mid=(l+r)//2 print("?"+str(mid),flush=True) res=int(input()) if res: l=mid else: r=mid print("?"+str(r),flush=True) res=int(input()) if res: print("!"+str(r),flush=True) else: print("!"+str(l),flush=True)