結果

問題 No.2008 Super Worker
ユーザー googol_S0googol_S0
提出日時 2022-07-15 21:43:17
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 321 bytes
コンパイル時間 401 ms
コンパイル使用メモリ 87,276 KB
実行使用メモリ 171,700 KB
最終ジャッジ日時 2023-09-10 01:08:16
合計ジャッジ時間 12,299 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 219 ms
96,056 KB
testcase_01 AC 216 ms
89,120 KB
testcase_02 AC 221 ms
88,816 KB
testcase_03 AC 214 ms
88,796 KB
testcase_04 AC 217 ms
88,704 KB
testcase_05 AC 221 ms
88,940 KB
testcase_06 AC 215 ms
88,656 KB
testcase_07 AC 218 ms
88,788 KB
testcase_08 AC 219 ms
88,928 KB
testcase_09 AC 220 ms
88,968 KB
testcase_10 AC 219 ms
88,852 KB
testcase_11 AC 219 ms
89,180 KB
testcase_12 AC 224 ms
89,160 KB
testcase_13 AC 358 ms
94,512 KB
testcase_14 AC 404 ms
95,196 KB
testcase_15 AC 363 ms
93,524 KB
testcase_16 AC 383 ms
94,488 KB
testcase_17 AC 396 ms
94,232 KB
testcase_18 AC 390 ms
93,784 KB
testcase_19 AC 332 ms
93,468 KB
testcase_20 AC 337 ms
93,952 KB
testcase_21 AC 337 ms
93,932 KB
testcase_22 AC 330 ms
94,252 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()))
from decimal import *
getcontext().prec=50
X=[(Decimal(B[i]-1)/Decimal(A[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*X[i][1])%mod
  V=(V*X[i][2])%mod
print(ANS)
0