結果

問題 No.1325 Subsequence Score
ユーザー brthyyjpbrthyyjp
提出日時 2021-02-20 16:02:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 154 ms / 2,000 ms
コード長 184 bytes
コンパイル時間 191 ms
コンパイル使用メモリ 81,696 KB
実行使用メモリ 153,544 KB
最終ジャッジ日時 2023-10-17 23:10:34
合計ジャッジ時間 4,789 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
53,388 KB
testcase_01 AC 39 ms
53,388 KB
testcase_02 AC 38 ms
53,388 KB
testcase_03 AC 45 ms
59,904 KB
testcase_04 AC 39 ms
53,388 KB
testcase_05 AC 43 ms
59,904 KB
testcase_06 AC 38 ms
53,388 KB
testcase_07 AC 44 ms
59,904 KB
testcase_08 AC 39 ms
53,388 KB
testcase_09 AC 38 ms
53,388 KB
testcase_10 AC 39 ms
53,388 KB
testcase_11 AC 39 ms
53,388 KB
testcase_12 AC 39 ms
53,388 KB
testcase_13 AC 154 ms
153,148 KB
testcase_14 AC 74 ms
94,336 KB
testcase_15 AC 133 ms
135,328 KB
testcase_16 AC 144 ms
144,140 KB
testcase_17 AC 101 ms
101,816 KB
testcase_18 AC 70 ms
89,432 KB
testcase_19 AC 152 ms
153,492 KB
testcase_20 AC 57 ms
75,608 KB
testcase_21 AC 83 ms
101,208 KB
testcase_22 AC 104 ms
103,980 KB
testcase_23 AC 151 ms
153,472 KB
testcase_24 AC 150 ms
153,464 KB
testcase_25 AC 151 ms
153,460 KB
testcase_26 AC 151 ms
153,544 KB
testcase_27 AC 152 ms
153,464 KB
testcase_28 AC 39 ms
53,388 KB
testcase_29 AC 38 ms
53,388 KB
testcase_30 AC 38 ms
53,388 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = list(map(int, input().split()))

mod = 998244353
ans = 0
for i, a in enumerate(A):
    ans += (i+2)*a
    ans %= mod
ans *= pow(2, n-2, mod)
ans %= mod
print(ans)
0