問題一覧 > 通常問題

No.1145 Sums of Powers

レベル : / AI推定難易度 : 2100 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 72
作問者 : risujiroh / テスター : noimi
お気に入りにしたユーザー ProblemId : 4665 / 自分の提出
問題文最終更新日: 2020-07-31 21:20:44
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 259 (順位表) の他の問題:

Problem Statement

You are given a sequence $A$ of length $N$ and an integer $M$.
For each $K=1,2,\ldots,M$, find $S_K:=\sum_{i=1}^N A_i^K$ modulo $998244353$.

Input

$N\ M$
$A_1\ A_2\ \cdots\ A_N$

Constraints

・$1\le N,M\le 10^5$
・$0\le A_i\lt 998244353$
・All inputs are integers.

Output

Print $S_1,S_2,\ldots,S_M$ modulo $998244353$, separated by spaces.
Print a newline at the end.

Sample

Sample 1
Input
10 3
1 2 3 4 5 6 7 8 9 10
Output
55 385 3025

Sample 2
Input
3 14
1 5 9
Output
15 107 855 7187 62175 547067 4861095 43437347 389373615 501816968 484312792 170525208 558164364 140666768

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。