結果
| 問題 |
No.246 質問と回答
|
| コンテスト | |
| ユーザー |
taba
|
| 提出日時 | 2016-04-16 04:30:12 |
| 言語 | Python2 (2.7.18) |
| 結果 |
AC
|
| 実行時間 | 71 ms / 2,000 ms |
| コード長 | 268 bytes |
| コンパイル時間 | 143 ms |
| コンパイル使用メモリ | 6,912 KB |
| 実行使用メモリ | 25,476 KB |
| 平均クエリ数 | 31.30 |
| 最終ジャッジ日時 | 2024-07-16 20:03:25 |
| 合計ジャッジ時間 | 4,074 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
import sys
def request(s):
print s
sys.stdout.flush()
return raw_input()
l=1
h=int(10**9)
while h-l>1:
m=(l+h)/2
r=request("? "+`m`)
if r=="0":
h=m-1
else:
l=m
#print l,h
r=request("? "+`h`)
if r=="1":
print"! "+`h`
else:
print"! "+`l`
sys.stdout.flush()
taba