Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register
Language:
Equivalent Polynomial
Time Limit: 2000MSMemory Limit: 65536K
Total Submissions: 2705Accepted: 747

Description

Given a polynomial and a number t, please convert it into an equivalent polynomial in the form of .

Input

The input contains several test cases.
The first line of each test case gives two integer n (1 < n ≤ 200) and t (-10 ≤ t ≤ 10). The following line is a sequence of n integer a0,a1, ... ,an (-1000 ≤ ai ≤ 1000), which is separated by exactly one space.

Output

For each test case, output the equivalent polynomial's coefficient b0,b1, ... ,bn. One line for each test case and each number is separated by exactly one space, no extra space at the end of each line.

Sample Input

2 1
1 0 2

Sample Output

3 4 2

Source

[Submit]   [Go Back]   [Status]   [Discuss]

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator