No.3027 f-Sequence and h-Sequence
タグ : / 解いたユーザー数 73
作問者 :
ジュ・ビオレ・グレイス
/ テスター :
👑 Problem Statement
A polynomial with integer coefficients $F(X) = F_0 X^N + F_1 X^{N-1} + \dots + F_N$ is given as input. Find the integers $H_i$ such that $F(X-1) = H_0 X^N + H_1 X^{N-1} + \dots + H_N$, and print them in the order $H_0, \dots, H_N$, separated by single half-width spaces.
Input
$N$ $F_0 \ F_1 \ \dots \ F_N$
$1 \leq N \leq 25,$
$-10^8 \leq F_i \leq 10^8$ are integers.
Output
Print $H_0, \dots, H_N$ in this order, separated by single half-width spaces. Note that $H_i$ does not necessarily fit in a 32-bit integer. Print a newline at the end.
Sample
Sample 1
Input
3 1 3 3 1
Output
1 0 0 0
Since $F(X) = X^3 + 3X^2 + 3X + 1 = (X+1)^3$, we have $F(X-1) = X^3$.
Sample 2
Input
4 1 2 3 4 5
Output
1 -2 3 0 3
Sample 3
Input
5 12345678 90123456 78901234 56789012 34567890 12345678
Output
12345678 28395066 -158135810 237369266 -141071866 33443344
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。