結果
| 問題 |
No.210 探し物はどこですか?
|
| コンテスト | |
| ユーザー |
nisizawa
|
| 提出日時 | 2017-12-12 13:22:49 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 1,430 ms / 2,000 ms |
| コード長 | 352 bytes |
| コンパイル時間 | 250 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-12-14 04:57:08 |
| 合計ジャッジ時間 | 56,288 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 43 |
ソースコード
from heapq import heappop, heappush
n = int(input())
p_ls = map(lambda p: int(p) / 1000, input().split())
q_ls = map(lambda q: int(q) / 100, input().split())
hq = []
for p, q in zip(p_ls, q_ls):
heappush(hq, (-p * q, 1 - q))
ans = 0
for i in range(1, 1000000):
t, tq = heappop(hq)
ans += -i * t
heappush(hq, (t * tq, tq))
print(ans)
nisizawa