結果

問題 No.1325 Subsequence Score
ユーザー 👑 KazunKazun
提出日時 2020-12-22 00:23:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 453 ms / 2,000 ms
コード長 235 bytes
コンパイル時間 201 ms
コンパイル使用メモリ 81,760 KB
実行使用メモリ 176,464 KB
最終ジャッジ日時 2023-10-21 12:12:35
合計ジャッジ時間 7,514 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,524 KB
testcase_01 AC 39 ms
53,524 KB
testcase_02 AC 38 ms
53,524 KB
testcase_03 AC 46 ms
60,108 KB
testcase_04 AC 40 ms
53,528 KB
testcase_05 AC 45 ms
60,112 KB
testcase_06 AC 39 ms
53,528 KB
testcase_07 AC 45 ms
60,112 KB
testcase_08 AC 38 ms
53,528 KB
testcase_09 AC 39 ms
53,528 KB
testcase_10 AC 40 ms
53,528 KB
testcase_11 AC 41 ms
53,528 KB
testcase_12 AC 39 ms
53,528 KB
testcase_13 AC 428 ms
175,368 KB
testcase_14 AC 148 ms
97,132 KB
testcase_15 AC 364 ms
151,336 KB
testcase_16 AC 399 ms
165,136 KB
testcase_17 AC 204 ms
100,652 KB
testcase_18 AC 138 ms
94,304 KB
testcase_19 AC 453 ms
176,184 KB
testcase_20 AC 98 ms
84,664 KB
testcase_21 AC 177 ms
103,392 KB
testcase_22 AC 215 ms
102,780 KB
testcase_23 AC 441 ms
176,464 KB
testcase_24 AC 447 ms
176,460 KB
testcase_25 AC 442 ms
176,456 KB
testcase_26 AC 448 ms
176,460 KB
testcase_27 AC 448 ms
176,460 KB
testcase_28 AC 39 ms
53,528 KB
testcase_29 AC 39 ms
53,528 KB
testcase_30 AC 39 ms
53,528 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=sys.stdin.readline

N=int(input())
A=[0]+list(map(int,input().split()))
Mod=998244353

if N==1:
    print(A[1]%Mod)
    exit(0)

X=0
for i in range(1,N+1):
    X+=pow(2,N-2,Mod)*(i+1)*A[i]
    X%=Mod

print(int(X%Mod))
0