結果

問題 No.2008 Super Worker
ユーザー yas_yasyuyas_yasyu
提出日時 2022-07-15 23:26:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 331 bytes
コンパイル時間 158 ms
コンパイル使用メモリ 10,740 KB
実行使用メモリ 53,948 KB
最終ジャッジ日時 2023-09-10 05:19:48
合計ジャッジ時間 5,207 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
12,348 KB
testcase_01 AC 15 ms
7,824 KB
testcase_02 AC 16 ms
7,852 KB
testcase_03 AC 16 ms
7,752 KB
testcase_04 AC 16 ms
7,876 KB
testcase_05 AC 15 ms
7,868 KB
testcase_06 AC 15 ms
7,756 KB
testcase_07 AC 15 ms
7,844 KB
testcase_08 AC 15 ms
7,824 KB
testcase_09 AC 15 ms
7,760 KB
testcase_10 AC 15 ms
7,832 KB
testcase_11 AC 15 ms
7,828 KB
testcase_12 AC 15 ms
7,832 KB
testcase_13 AC 19 ms
8,320 KB
testcase_14 AC 22 ms
8,296 KB
testcase_15 AC 19 ms
8,300 KB
testcase_16 AC 20 ms
8,352 KB
testcase_17 AC 20 ms
8,312 KB
testcase_18 AC 39 ms
8,508 KB
testcase_19 AC 23 ms
8,312 KB
testcase_20 AC 26 ms
8,428 KB
testcase_21 AC 26 ms
8,416 KB
testcase_22 AC 23 ms
8,400 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()))
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]
print(money)

0