結果

問題 No.1325 Subsequence Score
ユーザー 👑 Kazun
提出日時 2020-12-22 00:23:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 461 ms / 2,000 ms
コード長 235 bytes
コンパイル時間 186 ms
コンパイル使用メモリ 82,380 KB
実行使用メモリ 177,044 KB
最終ジャッジ日時 2024-09-21 13:29:48
合計ジャッジ時間 7,193 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

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