結果

問題 No.210 探し物はどこですか?
コンテスト
ユーザー yaoshimax
提出日時 2015-05-24 19:01:11
言語 PyPy2
(7.3.20)
コンパイル:
pypy2 -m py_compile _filename_
実行:
/usr/bin/pypy2 Main.pyc
結果
AC  
実行時間 532 ms / 2,000 ms
コード長 362 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 243 ms
コンパイル使用メモリ 81,280 KB
実行使用メモリ 87,432 KB
最終ジャッジ日時 2026-03-27 18:06:52
合計ジャッジ時間 10,925 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 43
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from heapq import heappush,heappop
n=int(raw_input())
P=map(int,raw_input().split())
Q=map(int,raw_input().split())
hq=[]
for i,p in enumerate(P):
    heappush(hq,(-p*Q[i]*1.0/100000,i))
ans=0.0
time=1
while True:
   cur,i=heappop(hq)
   ans+=-time*cur
   if -time*cur < 0.000001:
       break
   time+=1
   heappush(hq,(cur*(100-Q[i])/100,i))
print "%.10f"%ans
0