結果

問題 No.2008 Super Worker
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2022-07-15 21:40:53
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 716 ms / 2,000 ms
コード長 387 bytes
コンパイル時間 1,993 ms
コンパイル使用メモリ 86,960 KB
実行使用メモリ 130,556 KB
最終ジャッジ日時 2023-09-10 01:03:46
合計ジャッジ時間 13,204 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,732 KB
testcase_01 AC 72 ms
71,636 KB
testcase_02 AC 73 ms
71,544 KB
testcase_03 AC 73 ms
71,328 KB
testcase_04 AC 72 ms
71,248 KB
testcase_05 AC 71 ms
71,500 KB
testcase_06 AC 72 ms
71,340 KB
testcase_07 AC 72 ms
71,240 KB
testcase_08 AC 69 ms
71,380 KB
testcase_09 AC 70 ms
71,384 KB
testcase_10 AC 72 ms
71,396 KB
testcase_11 AC 72 ms
71,332 KB
testcase_12 AC 72 ms
71,504 KB
testcase_13 AC 125 ms
76,904 KB
testcase_14 AC 80 ms
76,868 KB
testcase_15 AC 81 ms
76,928 KB
testcase_16 AC 81 ms
76,864 KB
testcase_17 AC 81 ms
76,792 KB
testcase_18 AC 80 ms
76,768 KB
testcase_19 AC 76 ms
75,856 KB
testcase_20 AC 81 ms
76,760 KB
testcase_21 AC 80 ms
76,576 KB
testcase_22 AC 76 ms
75,916 KB
testcase_23 AC 702 ms
130,448 KB
testcase_24 AC 701 ms
130,556 KB
testcase_25 AC 698 ms
130,316 KB
testcase_26 AC 695 ms
130,316 KB
testcase_27 AC 716 ms
130,544 KB
testcase_28 AC 680 ms
121,832 KB
testcase_29 AC 672 ms
122,012 KB
testcase_30 AC 676 ms
121,672 KB
testcase_31 AC 667 ms
122,044 KB
testcase_32 AC 668 ms
121,872 KB
testcase_33 AC 191 ms
121,692 KB
testcase_34 AC 672 ms
122,784 KB
testcase_35 AC 527 ms
123,308 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

"""

"""

import sys
from sys import stdin

N = int(stdin.readline())

A = list(map(int,stdin.readline().split()))

B = list(map(int,stdin.readline().split()))

ba = [ ( A[i] / (0.9999999999999999-B[i]) ,B[i],A[i]) for i in range(N) ]
ba.sort()
ba.reverse()

lv = 1
ans = 0
mod = 10**9+7

for _,b,a in ba:

    ans += lv * a
    ans %= mod

    lv *= b
    lv %= mod

print (ans % mod)
0