結果

問題 No.2008 Super Worker
ユーザー googol_S0
提出日時 2022-07-15 21:41:00
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 313 bytes
コンパイル時間 182 ms
コンパイル使用メモリ 82,628 KB
実行使用メモリ 163,420 KB
最終ジャッジ日時 2024-06-27 17:16:22
合計ジャッジ時間 8,712 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 3 WA * 17 TLE * 1 -- * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
from decimal import *
getcontext().prec=50
X=[(Decimal(A[i])/Decimal(B[i]),A[i],B[i]) for i in range(N)]
X.sort(reverse=True)
ANS=0
V=1
mod=998244353
mod=10**9+7
for i in range(N):
  ANS=(ANS+V*A[i])%mod
  V=(V*B[i])%mod
print(ANS)
0