Stirling Number of the First Kind

AC一覧

Problem Statement
問題文

The signed Stirling numbers of the first kind $s(n, k)$ are defined as the coefficients in the identity $$x (x - 1) \cdots (x - (n - 1)) = \sum_{k=0}^n s(n, k) x^k.$$

You are given an integer $N$. Calculate $s(N, k) \bmod 998{,}244{,}353$ for $0 \le k \le N$.

Constraints
制約

Input
入力

$N$

Output
出力

$s(N, 0)$ $\cdots$ $s(N, N)$

Sample
サンプル

# 1

5
0 24 998244303 35 998244343 1

Forum


Timelimit: 10 secs

Before submitting, please confirm terms and conditions