結果

問題 No.2008 Super Worker
ユーザー gr1msl3y
提出日時 2022-08-29 23:13:27
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 232 bytes
コンパイル時間 343 ms
コンパイル使用メモリ 82,392 KB
実行使用メモリ 115,480 KB
最終ジャッジ日時 2024-11-06 19:59:49
合計ジャッジ時間 7,860 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 5 WA * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
X=list(range(N))
X.sort(key=lambda x: (B[x]-1)/A[x])
ans=0
MOD=10**9+7
x=1
for a,b in zip(A,B):
    ans+=x*a%MOD
    ans%=MOD
    x=x*b%MOD
print(ans)
0