http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2969
全场第一水题。我不知道怎么解释,看代码就好了。。。
#include<bits/stdc++.h>
using namespace std;
int main() {
int t,n,a[];
cin>>t;
while(t--) {
cin>>n;
if(n==) {
cin>>a[];
cout<<n<<endl;
} else {
for(int i=n; i>=; i--) {
cin>>a[i];
a[i]*=i;
}
cout<<a[n];
for(int i=n-; i>; i--)
printf(" %d",a[i]);
cout<<endl;
}
}
return ;
}