AtCoder Regular Contest 154
F
Dice Game
AtCoder
⌀ 3616
原题
← E→
翻译中…

Problem Statement

翻译中…

We have an $N$-sided die where all sides have the same probability to show up. Let us repeat rolling this die until every side has shown up.

翻译中…

For integers $i$ such that $1 \le i \le M$, find the expected value, modulo $998244353$, of the $i$-th power of the number of times we roll the die.

翻译中…

Definition of expected value modulo $998244353$ It can be proved that the sought expected values are always rational numbers. Additionally, under the constraints of this problem, when such a value is represented as an irreducible fraction $\frac{P}{Q}$, it can be proved that $Q \neq 0 \pmod{998244353}$. Thus, there is a unique integer $R$ such that $R \times Q = P \pmod{998244353}$ and $0 \le R < 998244353$. Print this $R$.

翻译中…

Constraints

翻译中…
  • $1 \le N,M \le 2 \times 10^5$
  • All values in the input are integers.
翻译中…

Input

翻译中…

The input is given from Standard Input in the following format:

翻译中…

N M

翻译中…

Output

翻译中…

Print $M$ lines.

翻译中…

The $i$-th line should contain the expected value, modulo $998244353$, of the $i$-th power of the number of times we roll the die.

翻译中…

样例

Input #1
3 3
Output #1
499122182
37
748683574
For $i=1$, you should find the expected value of the number of times we roll the die, which is $\frac{11}{2}$.
Input #2
7 8
Output #2
449209977
705980975
631316005
119321168
62397541
596241562
584585746
378338599
Input #3
2023 7
Output #3
442614988
884066164
757979000
548628857
593993207
780067557
524115712
题目信息
题号
arc154_f
时间限制
6 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。