結果
| 問題 |
No.210 探し物はどこですか?
|
| コンテスト | |
| ユーザー |
yaoshimax
|
| 提出日時 | 2015-05-24 19:01:11 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 655 ms / 2,000 ms |
| コード長 | 362 bytes |
| コンパイル時間 | 112 ms |
| コンパイル使用メモリ | 76,900 KB |
| 実行使用メモリ | 82,980 KB |
| 最終ジャッジ日時 | 2024-07-06 06:49:12 |
| 合計ジャッジ時間 | 11,318 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 43 |
ソースコード
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
yaoshimax