結果

問題 No.210 探し物はどこですか?
ユーザー nisizawanisizawa
提出日時 2017-12-12 13:22:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,125 ms / 2,000 ms
コード長 352 bytes
コンパイル時間 308 ms
コンパイル使用メモリ 10,888 KB
実行使用メモリ 8,164 KB
最終ジャッジ日時 2023-08-20 22:19:09
合計ジャッジ時間 47,602 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 884 ms
7,960 KB
testcase_01 AC 945 ms
7,904 KB
testcase_02 AC 1,013 ms
8,120 KB
testcase_03 AC 898 ms
7,912 KB
testcase_04 AC 875 ms
7,972 KB
testcase_05 AC 856 ms
7,956 KB
testcase_06 AC 852 ms
8,092 KB
testcase_07 AC 866 ms
7,980 KB
testcase_08 AC 788 ms
8,032 KB
testcase_09 AC 791 ms
8,104 KB
testcase_10 AC 813 ms
8,092 KB
testcase_11 AC 837 ms
8,120 KB
testcase_12 AC 812 ms
7,956 KB
testcase_13 AC 996 ms
8,028 KB
testcase_14 AC 1,040 ms
7,908 KB
testcase_15 AC 1,075 ms
8,040 KB
testcase_16 AC 1,038 ms
7,956 KB
testcase_17 AC 1,054 ms
8,032 KB
testcase_18 AC 898 ms
7,980 KB
testcase_19 AC 897 ms
8,052 KB
testcase_20 AC 896 ms
7,956 KB
testcase_21 AC 861 ms
8,040 KB
testcase_22 AC 871 ms
7,988 KB
testcase_23 AC 1,066 ms
8,124 KB
testcase_24 AC 1,037 ms
8,120 KB
testcase_25 AC 1,056 ms
7,908 KB
testcase_26 AC 1,044 ms
7,984 KB
testcase_27 AC 1,057 ms
8,020 KB
testcase_28 AC 1,018 ms
7,948 KB
testcase_29 AC 991 ms
8,028 KB
testcase_30 AC 999 ms
7,980 KB
testcase_31 AC 999 ms
8,040 KB
testcase_32 AC 1,020 ms
8,080 KB
testcase_33 AC 1,112 ms
8,044 KB
testcase_34 AC 1,125 ms
7,996 KB
testcase_35 AC 1,097 ms
8,116 KB
testcase_36 AC 1,123 ms
7,940 KB
testcase_37 AC 1,116 ms
8,160 KB
testcase_38 AC 1,043 ms
7,976 KB
testcase_39 AC 1,059 ms
7,984 KB
testcase_40 AC 1,058 ms
8,124 KB
testcase_41 AC 1,055 ms
8,164 KB
testcase_42 AC 1,067 ms
7,980 KB
testcase_43 AC 501 ms
7,956 KB
testcase_44 AC 702 ms
8,032 KB
testcase_45 AC 875 ms
7,976 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0