結果

問題 No.1325 Subsequence Score
ユーザー りあんりあん
提出日時 2020-12-22 05:16:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 222 ms / 2,000 ms
コード長 166 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 11,808 KB
実行使用メモリ 66,848 KB
最終ジャッジ日時 2023-10-21 12:25:26
合計ジャッジ時間 4,530 ms
ジャッジサーバーID
(参考情報)
judge11 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,080 KB
testcase_01 AC 30 ms
10,080 KB
testcase_02 AC 30 ms
10,080 KB
testcase_03 AC 30 ms
10,204 KB
testcase_04 AC 29 ms
10,156 KB
testcase_05 AC 30 ms
10,280 KB
testcase_06 AC 29 ms
10,132 KB
testcase_07 AC 30 ms
10,216 KB
testcase_08 AC 30 ms
10,080 KB
testcase_09 AC 29 ms
10,100 KB
testcase_10 AC 29 ms
10,112 KB
testcase_11 AC 29 ms
10,132 KB
testcase_12 AC 29 ms
10,176 KB
testcase_13 AC 216 ms
66,032 KB
testcase_14 AC 81 ms
25,072 KB
testcase_15 AC 186 ms
55,296 KB
testcase_16 AC 204 ms
62,124 KB
testcase_17 AC 108 ms
32,504 KB
testcase_18 AC 74 ms
22,964 KB
testcase_19 AC 217 ms
65,588 KB
testcase_20 AC 54 ms
17,016 KB
testcase_21 AC 92 ms
28,604 KB
testcase_22 AC 108 ms
33,096 KB
testcase_23 AC 215 ms
65,868 KB
testcase_24 AC 219 ms
66,848 KB
testcase_25 AC 221 ms
66,848 KB
testcase_26 AC 222 ms
66,848 KB
testcase_27 AC 219 ms
66,848 KB
testcase_28 AC 29 ms
10,080 KB
testcase_29 AC 29 ms
10,080 KB
testcase_30 AC 29 ms
10,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
M = 998244353
n = int(input())
a = list(map(int, input().split()))
a.reverse()
print((sum(itertools.accumulate(a)) + sum(a)) * pow(2, n - 2, M) % M)
0