結果

問題 No.2008 Super Worker
ユーザー naniwazunaniwazu
提出日時 2023-03-19 18:55:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 418 ms / 2,000 ms
コード長 292 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 81,860 KB
実行使用メモリ 135,332 KB
最終ジャッジ日時 2023-10-18 17:52:38
合計ジャッジ時間 9,159 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,552 KB
testcase_01 AC 38 ms
53,552 KB
testcase_02 AC 38 ms
53,552 KB
testcase_03 AC 38 ms
53,552 KB
testcase_04 AC 39 ms
53,552 KB
testcase_05 AC 37 ms
53,552 KB
testcase_06 AC 38 ms
53,552 KB
testcase_07 AC 38 ms
53,552 KB
testcase_08 AC 38 ms
53,552 KB
testcase_09 AC 38 ms
53,552 KB
testcase_10 AC 38 ms
53,552 KB
testcase_11 AC 38 ms
53,552 KB
testcase_12 AC 37 ms
53,552 KB
testcase_13 AC 46 ms
62,608 KB
testcase_14 AC 47 ms
62,608 KB
testcase_15 AC 46 ms
62,608 KB
testcase_16 AC 46 ms
62,608 KB
testcase_17 AC 48 ms
62,608 KB
testcase_18 AC 48 ms
62,608 KB
testcase_19 AC 43 ms
59,552 KB
testcase_20 AC 46 ms
62,608 KB
testcase_21 AC 48 ms
62,608 KB
testcase_22 AC 43 ms
59,552 KB
testcase_23 AC 362 ms
120,280 KB
testcase_24 AC 358 ms
120,104 KB
testcase_25 AC 368 ms
120,100 KB
testcase_26 AC 357 ms
120,292 KB
testcase_27 AC 346 ms
120,292 KB
testcase_28 AC 418 ms
134,628 KB
testcase_29 AC 403 ms
134,636 KB
testcase_30 AC 398 ms
134,600 KB
testcase_31 AC 409 ms
134,628 KB
testcase_32 AC 402 ms
134,624 KB
testcase_33 AC 164 ms
134,392 KB
testcase_34 AC 408 ms
135,332 KB
testcase_35 AC 135 ms
118,996 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
mod = 10**9+7

AB = list(zip(A, B))
AB.sort(key = lambda x:(1-x[1])/x[0])

level = 1
salary = 0
for Ai, Bi in AB:
    salary += Ai*level
    salary %= mod
    level *= Bi
    level %= mod

print(salary)
0