結果

問題 No.2008 Super Worker
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2022-07-15 21:34:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 797 ms / 2,000 ms
コード長 324 bytes
コンパイル時間 447 ms
コンパイル使用メモリ 87,004 KB
実行使用メモリ 145,500 KB
最終ジャッジ日時 2023-09-10 00:48:34
合計ジャッジ時間 13,932 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
71,236 KB
testcase_01 AC 79 ms
71,252 KB
testcase_02 AC 79 ms
71,232 KB
testcase_03 AC 80 ms
71,428 KB
testcase_04 AC 78 ms
71,236 KB
testcase_05 AC 78 ms
71,252 KB
testcase_06 AC 80 ms
71,360 KB
testcase_07 AC 77 ms
71,348 KB
testcase_08 AC 78 ms
71,252 KB
testcase_09 AC 79 ms
71,112 KB
testcase_10 AC 78 ms
71,228 KB
testcase_11 AC 78 ms
71,364 KB
testcase_12 AC 78 ms
71,480 KB
testcase_13 AC 89 ms
76,764 KB
testcase_14 AC 88 ms
76,736 KB
testcase_15 AC 87 ms
76,852 KB
testcase_16 AC 87 ms
76,724 KB
testcase_17 AC 90 ms
76,716 KB
testcase_18 AC 90 ms
76,952 KB
testcase_19 AC 82 ms
75,668 KB
testcase_20 AC 86 ms
76,656 KB
testcase_21 AC 89 ms
76,652 KB
testcase_22 AC 82 ms
75,680 KB
testcase_23 AC 785 ms
125,288 KB
testcase_24 AC 782 ms
125,384 KB
testcase_25 AC 790 ms
125,316 KB
testcase_26 AC 788 ms
125,136 KB
testcase_27 AC 786 ms
125,408 KB
testcase_28 AC 797 ms
140,036 KB
testcase_29 AC 784 ms
139,912 KB
testcase_30 AC 783 ms
139,608 KB
testcase_31 AC 757 ms
139,784 KB
testcase_32 AC 765 ms
139,696 KB
testcase_33 AC 227 ms
140,016 KB
testcase_34 AC 785 ms
139,612 KB
testcase_35 AC 687 ms
145,500 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from operator import le


n = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
mod = 10**9+7
X = []
for a,b in zip(A,B):
    c = (b-1)/a
    X.append([c,a,b])
X.sort(reverse=True)
ans = 0
level = 1
for x,a,b in X:
    ans += a*level
    ans %= mod
    level *= b
    level %= mod
print(ans)
0