結果
問題 | No.2008 Super Worker |
ユーザー | yas_yasyu |
提出日時 | 2022-07-15 23:26:58 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 331 bytes |
コンパイル時間 | 2,021 ms |
コンパイル使用メモリ | 86,884 KB |
実行使用メモリ | 143,548 KB |
最終ジャッジ日時 | 2023-09-10 05:20:35 |
合計ジャッジ時間 | 6,538 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 76 ms
76,004 KB |
testcase_01 | AC | 70 ms
71,620 KB |
testcase_02 | AC | 69 ms
71,288 KB |
testcase_03 | AC | 70 ms
71,364 KB |
testcase_04 | AC | 68 ms
71,276 KB |
testcase_05 | AC | 69 ms
71,588 KB |
testcase_06 | AC | 69 ms
71,460 KB |
testcase_07 | AC | 70 ms
71,212 KB |
testcase_08 | AC | 69 ms
71,316 KB |
testcase_09 | AC | 69 ms
71,296 KB |
testcase_10 | AC | 70 ms
71,480 KB |
testcase_11 | AC | 70 ms
71,160 KB |
testcase_12 | AC | 72 ms
71,364 KB |
testcase_13 | AC | 89 ms
76,792 KB |
testcase_14 | AC | 84 ms
76,740 KB |
testcase_15 | AC | 80 ms
76,732 KB |
testcase_16 | AC | 83 ms
76,880 KB |
testcase_17 | AC | 82 ms
76,936 KB |
testcase_18 | AC | 108 ms
77,468 KB |
testcase_19 | AC | 82 ms
75,792 KB |
testcase_20 | AC | 91 ms
76,916 KB |
testcase_21 | AC | 89 ms
76,540 KB |
testcase_22 | AC | 82 ms
75,768 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 | -- | - |
ソースコード
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)