結果

問題 No.2550 MORE! JUMP! MORE!
ユーザー KudeKude
提出日時 2023-11-25 13:23:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 192 ms / 2,000 ms
コード長 333 bytes
コンパイル時間 172 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 101,220 KB
最終ジャッジ日時 2023-11-25 13:23:19
合計ジャッジ時間 6,948 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,332 KB
testcase_01 AC 34 ms
53,332 KB
testcase_02 AC 33 ms
53,332 KB
testcase_03 AC 33 ms
53,332 KB
testcase_04 AC 34 ms
53,332 KB
testcase_05 AC 33 ms
53,332 KB
testcase_06 AC 33 ms
53,332 KB
testcase_07 AC 33 ms
53,332 KB
testcase_08 AC 33 ms
53,332 KB
testcase_09 AC 33 ms
53,332 KB
testcase_10 AC 33 ms
53,332 KB
testcase_11 AC 37 ms
53,332 KB
testcase_12 AC 34 ms
53,332 KB
testcase_13 AC 34 ms
53,332 KB
testcase_14 AC 35 ms
53,332 KB
testcase_15 AC 36 ms
53,332 KB
testcase_16 AC 35 ms
53,332 KB
testcase_17 AC 34 ms
53,332 KB
testcase_18 AC 33 ms
53,332 KB
testcase_19 AC 32 ms
53,332 KB
testcase_20 AC 134 ms
91,760 KB
testcase_21 AC 92 ms
83,668 KB
testcase_22 AC 55 ms
69,224 KB
testcase_23 AC 121 ms
89,432 KB
testcase_24 AC 183 ms
101,220 KB
testcase_25 AC 128 ms
91,076 KB
testcase_26 AC 108 ms
86,168 KB
testcase_27 AC 159 ms
96,488 KB
testcase_28 AC 141 ms
93,536 KB
testcase_29 AC 112 ms
87,648 KB
testcase_30 AC 187 ms
100,576 KB
testcase_31 AC 187 ms
100,576 KB
testcase_32 AC 188 ms
100,576 KB
testcase_33 AC 192 ms
100,576 KB
testcase_34 AC 187 ms
100,576 KB
testcase_35 AC 186 ms
100,576 KB
testcase_36 AC 186 ms
100,576 KB
testcase_37 AC 188 ms
100,576 KB
testcase_38 AC 186 ms
100,576 KB
testcase_39 AC 191 ms
100,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 998244353
n = int(input())
ans = 0
sm_i = 0
cnt = 1
for i, x in enumerate(map(int, input().split())):
    c = cnt
    s = sm_i + cnt
    if i == n - 1:
        ans = (ans + s * x) % mod
    else:
        ans = (ans + s * x * pow(2, n - 2 - i, mod)) % mod
        cnt = (c + cnt) % mod
        sm_i = (sm_i + s) % mod
print(ans)
0