首页 > 代码库 > ZOJ 2969: Easy Task

ZOJ 2969: Easy Task

ZOJ 2969: Easy Task

 1 ///@date 2017-02-07
 2 ///@author Sycamore, ZJNU
 3 #include <iostream>
 4 using namespace std;
 5 int c[1001];
 6 int main()
 7 {
 8     int T;
 9     cin >> T;
10     while (T--)
11     {
12         int N;
13         cin >> N;
14         for (int i = N; i >=0; i--)cin >> c[i];
15         if (!N)
16         {
17             cout << 0 << endl;
18             continue;
19         }
20         for (int i = N; i>0; i--)
21         {
22             cout << c[i] * i;
23             cout << (i>1 ?   : \n);
24         }
25     }
26     return 0;
27 }

 

ZOJ 2969: Easy Task