結果

問題 No.2008 Super Worker
ユーザー ryusukeryusuke
提出日時 2022-07-16 10:22:04
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 333 bytes
コンパイル時間 320 ms
コンパイル使用メモリ 87,168 KB
実行使用メモリ 141,292 KB
最終ジャッジ日時 2023-09-10 17:55:34
合計ジャッジ時間 6,610 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
75,704 KB
testcase_01 AC 70 ms
71,080 KB
testcase_02 AC 70 ms
71,500 KB
testcase_03 AC 69 ms
71,580 KB
testcase_04 AC 70 ms
71,112 KB
testcase_05 AC 69 ms
71,108 KB
testcase_06 AC 69 ms
71,444 KB
testcase_07 AC 69 ms
71,332 KB
testcase_08 AC 70 ms
71,004 KB
testcase_09 AC 70 ms
71,216 KB
testcase_10 AC 70 ms
71,188 KB
testcase_11 AC 69 ms
71,276 KB
testcase_12 AC 71 ms
71,160 KB
testcase_13 AC 82 ms
76,488 KB
testcase_14 AC 84 ms
76,808 KB
testcase_15 AC 84 ms
76,680 KB
testcase_16 AC 84 ms
76,624 KB
testcase_17 AC 84 ms
76,832 KB
testcase_18 AC 108 ms
77,100 KB
testcase_19 AC 82 ms
75,740 KB
testcase_20 AC 92 ms
76,712 KB
testcase_21 AC 91 ms
76,668 KB
testcase_22 AC 83 ms
75,616 KB
testcase_23 TLE -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

l = []
for i in range(n):
    l.append((a[i], b[i], (b[i] - 1) / a[i]))

l.sort(key=lambda x: x[2], reverse=True)
ans = 0
mod = 10 ** 9 + 7
level = 1
for i in range(n):
    ans += level * l[i][0]
    level *= l[i][1]
    ans %= mod

print(ans)
0