結果

問題 No.246 質問と回答
ユーザー pluto77
提出日時 2017-02-16 08:36:54
言語 Python2
(2.7.18)
結果
AC  
実行時間 67 ms / 2,000 ms
コード長 219 bytes
コンパイル時間 517 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 25,220 KB
平均クエリ数 101.00
最終ジャッジ日時 2024-07-16 20:09:38
合計ジャッジ時間 3,810 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki_246
import sys

l=1
r=10**9+1
cnt=0
while l<r and cnt<100:
 cnt+=1
 mid=(l+r)/2
 print "? %d" % mid
 sys.stdout.flush()
 res=int(raw_input())
 if res==1:
  l=mid
 else:
  r=mid
print "! %d" % l
sys.stdout.flush()
0