結果
問題 | No.2008 Super Worker |
ユーザー | googol_S0 |
提出日時 | 2022-07-15 21:43:39 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 321 bytes |
コンパイル時間 | 300 ms |
コンパイル使用メモリ | 87,208 KB |
実行使用メモリ | 167,468 KB |
最終ジャッジ日時 | 2023-09-10 01:10:37 |
合計ジャッジ時間 | 11,551 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 217 ms
96,220 KB |
testcase_01 | AC | 218 ms
88,812 KB |
testcase_02 | AC | 214 ms
88,944 KB |
testcase_03 | AC | 215 ms
89,112 KB |
testcase_04 | AC | 220 ms
89,068 KB |
testcase_05 | AC | 218 ms
88,724 KB |
testcase_06 | AC | 225 ms
89,124 KB |
testcase_07 | AC | 223 ms
88,692 KB |
testcase_08 | AC | 218 ms
88,992 KB |
testcase_09 | AC | 216 ms
88,840 KB |
testcase_10 | AC | 215 ms
89,032 KB |
testcase_11 | AC | 215 ms
88,864 KB |
testcase_12 | AC | 219 ms
89,020 KB |
testcase_13 | AC | 349 ms
94,576 KB |
testcase_14 | AC | 389 ms
94,332 KB |
testcase_15 | AC | 353 ms
94,172 KB |
testcase_16 | AC | 379 ms
93,912 KB |
testcase_17 | AC | 389 ms
94,560 KB |
testcase_18 | AC | 374 ms
93,920 KB |
testcase_19 | AC | 323 ms
93,648 KB |
testcase_20 | AC | 328 ms
93,612 KB |
testcase_21 | AC | 330 ms
93,948 KB |
testcase_22 | AC | 323 ms
93,568 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 | -- | - |
ソースコード
N=int(input()) A=list(map(int,input().split())) B=list(map(int,input().split())) from decimal import * getcontext().prec=30 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)