結果

問題 No.2550 MORE! JUMP! MORE!
ユーザー NullzNullz
提出日時 2023-11-25 13:31:39
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 429 bytes
コンパイル時間 388 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 102,036 KB
最終ジャッジ日時 2023-11-25 13:31:45
合計ジャッジ時間 5,399 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,460 KB
testcase_01 AC 35 ms
53,460 KB
testcase_02 AC 36 ms
53,460 KB
testcase_03 AC 35 ms
53,460 KB
testcase_04 AC 36 ms
53,460 KB
testcase_05 AC 36 ms
53,460 KB
testcase_06 AC 36 ms
53,460 KB
testcase_07 AC 36 ms
53,460 KB
testcase_08 AC 36 ms
53,460 KB
testcase_09 AC 36 ms
53,460 KB
testcase_10 AC 37 ms
53,460 KB
testcase_11 AC 36 ms
53,460 KB
testcase_12 AC 36 ms
53,460 KB
testcase_13 AC 36 ms
53,460 KB
testcase_14 AC 36 ms
53,460 KB
testcase_15 AC 46 ms
53,460 KB
testcase_16 AC 35 ms
53,460 KB
testcase_17 AC 37 ms
53,460 KB
testcase_18 AC 36 ms
53,460 KB
testcase_19 AC 36 ms
53,460 KB
testcase_20 TLE -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import comb

mod = 998244353
n = int(input())
a = [*map(int, input().split())]
ans = 0
for i, v in enumerate(a):
    res = 0
    if i < n - 1:
        for j in range(i + 1):
            res = (res + comb(i, j) * (j + 1) * v) % mod
        res = (res * pow(2, n - 2 - i, mod)) % mod
    else:
        for j in range(n):
            res = (res + comb(n - 1, j) * (j + 1) * v) % mod
    ans = (ans + res) % mod
print(ans)
0