結果

問題 No.1325 Subsequence Score
ユーザー titiatitia
提出日時 2020-12-22 05:22:31
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 440 ms / 2,000 ms
コード長 196 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 11,816 KB
実行使用メモリ 67,240 KB
最終ジャッジ日時 2023-10-21 12:25:36
合計ジャッジ時間 6,739 ms
ジャッジサーバーID
(参考情報)
judge9 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,048 KB
testcase_01 AC 30 ms
10,048 KB
testcase_02 AC 29 ms
10,048 KB
testcase_03 AC 33 ms
10,168 KB
testcase_04 AC 31 ms
10,128 KB
testcase_05 AC 32 ms
10,244 KB
testcase_06 AC 30 ms
10,104 KB
testcase_07 AC 31 ms
10,184 KB
testcase_08 AC 29 ms
10,048 KB
testcase_09 AC 30 ms
10,064 KB
testcase_10 AC 30 ms
10,080 KB
testcase_11 AC 30 ms
10,104 KB
testcase_12 AC 30 ms
10,132 KB
testcase_13 AC 437 ms
67,240 KB
testcase_14 AC 145 ms
25,040 KB
testcase_15 AC 369 ms
58,432 KB
testcase_16 AC 407 ms
65,728 KB
testcase_17 AC 205 ms
32,452 KB
testcase_18 AC 126 ms
23,300 KB
testcase_19 AC 434 ms
65,536 KB
testcase_20 AC 85 ms
16,960 KB
testcase_21 AC 169 ms
28,548 KB
testcase_22 AC 199 ms
33,428 KB
testcase_23 AC 436 ms
66,788 KB
testcase_24 AC 438 ms
66,788 KB
testcase_25 AC 432 ms
64,744 KB
testcase_26 AC 440 ms
64,744 KB
testcase_27 AC 428 ms
64,744 KB
testcase_28 AC 30 ms
10,024 KB
testcase_29 AC 30 ms
10,024 KB
testcase_30 AC 30 ms
10,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int,input().split()))
mod=998244353
start=pow(2,N-1,mod)
sa=start*pow(2,mod-2,mod)
ANS=0

p=start
for i in range(N):
    ANS=ANS+p*A[i]
    ANS%=mod
    p+=sa

print(ANS)
0