結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,468 KB
testcase_01 AC 38 ms
53,468 KB
testcase_02 AC 37 ms
53,468 KB
testcase_03 AC 41 ms
59,988 KB
testcase_04 AC 37 ms
53,468 KB
testcase_05 AC 41 ms
59,988 KB
testcase_06 AC 37 ms
53,468 KB
testcase_07 AC 41 ms
59,988 KB
testcase_08 AC 37 ms
53,468 KB
testcase_09 AC 37 ms
53,468 KB
testcase_10 AC 37 ms
53,468 KB
testcase_11 AC 38 ms
53,468 KB
testcase_12 AC 38 ms
53,468 KB
testcase_13 AC 151 ms
153,224 KB
testcase_14 AC 74 ms
94,420 KB
testcase_15 AC 129 ms
135,392 KB
testcase_16 AC 137 ms
144,208 KB
testcase_17 AC 96 ms
101,916 KB
testcase_18 AC 68 ms
89,516 KB
testcase_19 AC 146 ms
153,556 KB
testcase_20 AC 55 ms
75,692 KB
testcase_21 AC 79 ms
101,308 KB
testcase_22 AC 99 ms
103,840 KB
testcase_23 AC 144 ms
153,612 KB
testcase_24 AC 145 ms
153,612 KB
testcase_25 AC 145 ms
153,616 KB
testcase_26 AC 148 ms
153,600 KB
testcase_27 AC 146 ms
153,612 KB
testcase_28 AC 37 ms
53,468 KB
testcase_29 AC 37 ms
53,468 KB
testcase_30 AC 36 ms
53,468 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

mod = 998244353

if n == 1:
    print(A[0]%mod)
    exit()

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