結果

問題 No.210 探し物はどこですか?
ユーザー titiatitia
提出日時 2022-06-28 02:53:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,447 ms / 2,000 ms
コード長 307 bytes
コンパイル時間 144 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-04-30 16:18:12
合計ジャッジ時間 56,762 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,078 ms
10,752 KB
testcase_01 AC 1,210 ms
10,752 KB
testcase_02 AC 1,271 ms
10,880 KB
testcase_03 AC 1,069 ms
10,752 KB
testcase_04 AC 1,062 ms
10,880 KB
testcase_05 AC 1,025 ms
10,880 KB
testcase_06 AC 1,045 ms
10,752 KB
testcase_07 AC 1,029 ms
10,752 KB
testcase_08 AC 946 ms
10,752 KB
testcase_09 AC 970 ms
10,752 KB
testcase_10 AC 935 ms
10,752 KB
testcase_11 AC 993 ms
10,752 KB
testcase_12 AC 993 ms
10,752 KB
testcase_13 AC 1,169 ms
10,880 KB
testcase_14 AC 1,354 ms
10,752 KB
testcase_15 AC 1,341 ms
10,752 KB
testcase_16 AC 1,298 ms
10,752 KB
testcase_17 AC 1,361 ms
10,752 KB
testcase_18 AC 1,081 ms
10,752 KB
testcase_19 AC 1,057 ms
10,880 KB
testcase_20 AC 1,082 ms
10,752 KB
testcase_21 AC 1,085 ms
10,752 KB
testcase_22 AC 1,093 ms
10,752 KB
testcase_23 AC 1,313 ms
10,880 KB
testcase_24 AC 1,282 ms
10,752 KB
testcase_25 AC 1,296 ms
10,752 KB
testcase_26 AC 1,283 ms
10,752 KB
testcase_27 AC 1,310 ms
10,880 KB
testcase_28 AC 1,236 ms
10,880 KB
testcase_29 AC 1,212 ms
10,752 KB
testcase_30 AC 1,215 ms
10,880 KB
testcase_31 AC 1,201 ms
10,880 KB
testcase_32 AC 1,210 ms
10,752 KB
testcase_33 AC 1,405 ms
10,880 KB
testcase_34 AC 1,391 ms
10,880 KB
testcase_35 AC 1,365 ms
10,880 KB
testcase_36 AC 1,447 ms
11,008 KB
testcase_37 AC 1,401 ms
10,880 KB
testcase_38 AC 1,300 ms
10,880 KB
testcase_39 AC 1,310 ms
10,880 KB
testcase_40 AC 1,281 ms
10,880 KB
testcase_41 AC 1,270 ms
11,008 KB
testcase_42 AC 1,313 ms
10,880 KB
testcase_43 AC 590 ms
10,880 KB
testcase_44 AC 851 ms
10,752 KB
testcase_45 AC 1,102 ms
10,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from heapq import heappop,heappush

n=int(input())
P=list(map(int,input().split()))
Q=list(map(int,input().split()))

X=[]
for i in range(n):
    X.append((-P[i]*Q[i]/100000,1-Q[i]/100))

X.sort()

ANS=0
for tests in range(1,999999):
    x,y=heappop(X)

    ANS+=-x*tests
    heappush(X,(x*y,y))

print(ANS)
0