You are given a formal power series $f(x) = \sum_ {i=0}^ {N-1} a_ i x^ i \in \mathbb{Q}[[x]]$ with $a_ 0 = 1$.
Calculate the first $N$ terms of $\log(f(x)) = \sum_ {i=0}^ {\infty} b_ i x^ i$.
In other words, find $g(x) = \sum_ {i=0}^ {N-1} b_ i x^ i \in \mathbb{Q}[[x]]$ such that $b_ 0 = 0$ and
$$f(x) \equiv \sum_ {k=0}^ {N-1} \frac{g(x)^ k}{k!} \pmod{x^ N}.$$
Print the coefficients modulo $998244353$.
$N$
$a_ 0$ $a_ 1$ $\cdots$ $a_ {N - 1}$
$b_ 0$ $b_ 1$ $\cdots$ $b_ {N - 1}$
5 1 1 499122179 166374064 291154613
0 1 2 3 4
| No. | Testdata Range | Score |
|---|