結果

問題 No.2008 Super Worker
ユーザー ryusukeryusuke
提出日時 2022-07-16 10:20:42
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 336 bytes
コンパイル時間 336 ms
コンパイル使用メモリ 86,892 KB
実行使用メモリ 78,440 KB
最終ジャッジ日時 2023-09-10 17:53:41
合計ジャッジ時間 6,930 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
78,440 KB
testcase_01 AC 70 ms
71,168 KB
testcase_02 AC 70 ms
71,000 KB
testcase_03 AC 70 ms
71,356 KB
testcase_04 AC 70 ms
71,296 KB
testcase_05 AC 69 ms
71,176 KB
testcase_06 AC 71 ms
71,384 KB
testcase_07 AC 70 ms
71,332 KB
testcase_08 AC 69 ms
71,196 KB
testcase_09 AC 71 ms
71,324 KB
testcase_10 AC 70 ms
71,168 KB
testcase_11 AC 70 ms
71,328 KB
testcase_12 AC 69 ms
71,432 KB
testcase_13 AC 91 ms
76,764 KB
testcase_14 AC 85 ms
76,664 KB
testcase_15 AC 82 ms
76,928 KB
testcase_16 AC 84 ms
76,928 KB
testcase_17 AC 84 ms
76,752 KB
testcase_18 AC 109 ms
77,412 KB
testcase_19 AC 83 ms
75,756 KB
testcase_20 AC 90 ms
76,676 KB
testcase_21 AC 91 ms
76,604 KB
testcase_22 AC 82 ms
75,624 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((i, a[i], b[i], (b[i] - 1) / a[i]))

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

print(ans)
0