結果

問題 No.2008 Super Worker
ユーザー AEnAEn
提出日時 2022-11-30 23:59:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 737 ms / 2,000 ms
コード長 321 bytes
コンパイル時間 175 ms
コンパイル使用メモリ 82,944 KB
実行使用メモリ 141,024 KB
最終ジャッジ日時 2024-04-16 18:55:15
合計ジャッジ時間 11,407 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,352 KB
testcase_01 AC 39 ms
52,096 KB
testcase_02 AC 41 ms
52,096 KB
testcase_03 AC 37 ms
51,840 KB
testcase_04 AC 37 ms
51,840 KB
testcase_05 AC 37 ms
52,096 KB
testcase_06 AC 36 ms
51,968 KB
testcase_07 AC 37 ms
52,224 KB
testcase_08 AC 38 ms
52,244 KB
testcase_09 AC 39 ms
52,096 KB
testcase_10 AC 39 ms
51,968 KB
testcase_11 AC 40 ms
52,224 KB
testcase_12 AC 38 ms
52,396 KB
testcase_13 AC 48 ms
61,312 KB
testcase_14 AC 48 ms
61,696 KB
testcase_15 AC 48 ms
61,952 KB
testcase_16 AC 48 ms
61,568 KB
testcase_17 AC 48 ms
61,440 KB
testcase_18 AC 48 ms
62,336 KB
testcase_19 AC 44 ms
59,136 KB
testcase_20 AC 48 ms
62,208 KB
testcase_21 AC 49 ms
61,824 KB
testcase_22 AC 44 ms
59,136 KB
testcase_23 AC 731 ms
140,684 KB
testcase_24 AC 737 ms
140,520 KB
testcase_25 AC 722 ms
140,096 KB
testcase_26 AC 719 ms
141,024 KB
testcase_27 AC 722 ms
140,692 KB
testcase_28 AC 713 ms
130,380 KB
testcase_29 AC 699 ms
130,588 KB
testcase_30 AC 701 ms
130,584 KB
testcase_31 AC 719 ms
130,592 KB
testcase_32 AC 703 ms
130,696 KB
testcase_33 AC 183 ms
128,968 KB
testcase_34 AC 703 ms
131,220 KB
testcase_35 AC 188 ms
138,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = []
for i, (a, b) in enumerate(zip(A, B)):
    C.append([(b-1)/a,i])
C.sort(reverse=True)

res = 0
lev = 1
mod =10**9+7
for i in range(N):
    res += A[C[i][1]]*lev
    res %= mod
    lev *= B[C[i][1]]
    lev %= mod
print(res)

0