結果

問題 No.2008 Super Worker
ユーザー yas_yasyuyas_yasyu
提出日時 2022-07-15 23:35:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 668 ms / 2,000 ms
コード長 349 bytes
コンパイル時間 280 ms
コンパイル使用メモリ 87,296 KB
実行使用メモリ 139,348 KB
最終ジャッジ日時 2023-09-10 05:32:43
合計ジャッジ時間 11,858 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,372 KB
testcase_01 AC 73 ms
71,424 KB
testcase_02 AC 74 ms
71,524 KB
testcase_03 AC 75 ms
71,144 KB
testcase_04 AC 74 ms
71,320 KB
testcase_05 AC 73 ms
71,348 KB
testcase_06 AC 74 ms
71,336 KB
testcase_07 AC 73 ms
71,376 KB
testcase_08 AC 74 ms
71,212 KB
testcase_09 AC 74 ms
71,604 KB
testcase_10 AC 74 ms
71,596 KB
testcase_11 AC 76 ms
71,376 KB
testcase_12 AC 73 ms
71,328 KB
testcase_13 AC 83 ms
76,708 KB
testcase_14 AC 83 ms
76,728 KB
testcase_15 AC 83 ms
76,868 KB
testcase_16 AC 84 ms
76,960 KB
testcase_17 AC 84 ms
76,600 KB
testcase_18 AC 82 ms
76,728 KB
testcase_19 AC 77 ms
75,788 KB
testcase_20 AC 82 ms
76,720 KB
testcase_21 AC 82 ms
76,920 KB
testcase_22 AC 82 ms
75,864 KB
testcase_23 AC 668 ms
139,168 KB
testcase_24 AC 667 ms
139,316 KB
testcase_25 AC 659 ms
139,348 KB
testcase_26 AC 666 ms
138,972 KB
testcase_27 AC 654 ms
139,128 KB
testcase_28 AC 659 ms
133,276 KB
testcase_29 AC 654 ms
133,284 KB
testcase_30 AC 644 ms
133,348 KB
testcase_31 AC 649 ms
133,380 KB
testcase_32 AC 658 ms
133,356 KB
testcase_33 AC 205 ms
131,516 KB
testcase_34 AC 653 ms
134,024 KB
testcase_35 AC 201 ms
133,144 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

job_weight = []
for i in range(n):
	job_weight.append(((B[i]-1)/A[i],i))
job_weight.sort(reverse=True)

money = 0
job_power = 1
for _,job in job_weight:
	money += A[job]*job_power
	money %= MOD
	job_power *= B[job]
	job_power %= MOD
print(money)

0