P4725 [Template] Polynomial Logarithm Function (Polynomial $\ln$).
Description
Given a polynomial $A(x)$ of degree $n - 1$, find a polynomial $B(x)$ modulo $x^n$ such that $B(x) \equiv \ln A(x)$.
All computations are done modulo $998244353$, and $a_i \in [0, 998244353) \cap \mathbb{Z}$.
Input Format
The first line contains an integer $n$.
The next line contains $n$ integers, which are the coefficients $a_0, a_1, \cdots, a_{n-1}$ of the polynomial in order.
It is guaranteed that $a_0 = 1$.
Output Format
Output $n$ integers, which are the coefficients $a_0, a_1, \cdots, a_{n-1}$ of the answer polynomial in order.
Explanation/Hint
For $100\%$ of the data, $n \le 10^5$.
Translated by ChatGPT 5