結果
問題 |
No.2008 Super Worker
|
ユーザー |
![]() |
提出日時 | 2022-07-15 21:40:34 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 301 bytes |
コンパイル時間 | 474 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 161,416 KB |
最終ジャッジ日時 | 2024-06-27 17:14:16 |
合計ジャッジ時間 | 8,686 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | AC * 2 WA * 18 TLE * 1 -- * 12 |
ソースコード
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 for i in range(N): ANS=(ANS+V*A[i])%mod V=(V*B[i])%mod print(ANS)