luogu#P4726. 【模板】多项式指数函数(多项式 exp)
【模板】多项式指数函数(多项式 exp)
Problem Description
Given a polynomial of degree , find a polynomial modulo such that . All coefficients are taken modulo .
Input Format
The first line contains an integer .
The next line contains integers, representing the coefficients of the polynomial in order.
It is guaranteed that .
Output Format
Output integers, representing the coefficients of the answer polynomial.
6
0 927384623 817976920 427326948 149643566 610586717
1 927384623 878326372 3882 273455637 998233543
Hint
For of the testdata, .
Translated by ChatGPT 5