結果

問題 No.2008 Super Worker
ユーザー june19312june19312
提出日時 2022-07-16 00:06:39
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 354 bytes
コンパイル時間 287 ms
コンパイル使用メモリ 86,724 KB
実行使用メモリ 142,016 KB
最終ジャッジ日時 2023-09-10 06:25:05
合計ジャッジ時間 6,779 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
78,128 KB
testcase_01 AC 75 ms
71,216 KB
testcase_02 AC 75 ms
71,236 KB
testcase_03 AC 75 ms
70,972 KB
testcase_04 AC 74 ms
71,256 KB
testcase_05 AC 74 ms
71,208 KB
testcase_06 AC 73 ms
71,264 KB
testcase_07 AC 75 ms
71,324 KB
testcase_08 AC 74 ms
71,036 KB
testcase_09 AC 76 ms
71,280 KB
testcase_10 AC 75 ms
71,284 KB
testcase_11 AC 75 ms
71,168 KB
testcase_12 AC 74 ms
71,348 KB
testcase_13 AC 88 ms
76,544 KB
testcase_14 AC 90 ms
76,420 KB
testcase_15 AC 87 ms
76,424 KB
testcase_16 AC 87 ms
76,716 KB
testcase_17 AC 90 ms
76,540 KB
testcase_18 WA -
testcase_19 AC 87 ms
75,696 KB
testcase_20 WA -
testcase_21 AC 97 ms
76,392 KB
testcase_22 AC 89 ms
75,492 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])*1000000)
    C.append([tmp,i])

C.sort()
C.reverse()

level = 1
ans = 0

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

print(ans%mod)
0