結果

問題 No.2008 Super Worker
ユーザー june19312june19312
提出日時 2022-07-16 00:09:58
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 353 bytes
コンパイル時間 685 ms
コンパイル使用メモリ 87,024 KB
実行使用メモリ 142,016 KB
最終ジャッジ日時 2023-09-10 06:29:49
合計ジャッジ時間 7,401 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
75,320 KB
testcase_01 AC 74 ms
70,900 KB
testcase_02 AC 74 ms
70,616 KB
testcase_03 AC 74 ms
70,796 KB
testcase_04 AC 73 ms
71,056 KB
testcase_05 AC 73 ms
70,908 KB
testcase_06 AC 74 ms
71,076 KB
testcase_07 AC 73 ms
70,720 KB
testcase_08 AC 75 ms
70,792 KB
testcase_09 AC 73 ms
70,648 KB
testcase_10 AC 74 ms
70,900 KB
testcase_11 AC 73 ms
70,972 KB
testcase_12 AC 73 ms
70,792 KB
testcase_13 AC 85 ms
76,248 KB
testcase_14 AC 89 ms
76,252 KB
testcase_15 AC 88 ms
76,080 KB
testcase_16 AC 88 ms
76,268 KB
testcase_17 AC 87 ms
76,316 KB
testcase_18 AC 114 ms
76,872 KB
testcase_19 AC 88 ms
75,412 KB
testcase_20 AC 96 ms
76,288 KB
testcase_21 AC 95 ms
76,280 KB
testcase_22 AC 87 ms
75,328 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

C = []

for i,v in enumerate(A):
    tmp = int(((B[i]-1)/A[i])*1000000000000)
    C.append([tmp,i])

C.sort()

level = 1
ans = 0

for i in range(N-1,-1,-1):
    tmp1 = C[i][1]
    ans+=level*A[tmp1]
    ans = ans%mod
    level*=B[tmp1]

print(ans%mod)
0