
66  The 5th Zhejiang Provincial Collegiate Programming Contest  1005
Calculating the derivation of a polynomial is an easy task.
Given a function f(x) , we use (f(x))' to denote its derivation.
We use x^n to denote x^{n}. To calculate the derivation of a polynomial, you should know 3 rules:
Here comes the problem, given a polynomial f(x) with nonnegative coefficients, can you write a program to calculate the derivation of it? Input Standard input will contain multiple test cases. The first line of the input is a single integer T (1 <= T <= 1000) which is the number of test cases. And it will be followed by T consecutive test cases. There are exactly 2 lines in each test case. The first line of each test case is a single line containing an integer N (0 <= N <= 100). The second line contains N + 1 nonnegative integers, C_{N}, C_{N1}, ..., C_{1}, C_{0}, ( 0 <= C_{i} <= 1000), which are the coefficients of f(x). C_{i} is the coefficient of the term with degree i in f(x). (C_{N}!=0) Output
For each test case calculate the result polynomial g(x) also in a single line. Sample Input 3 0 10 2 3 2 1 3 10 0 1 2 Sample Output 0 6 2 30 0 1 Author: CAO, Peng 