zoukankan      html  css  js  c++  java
  • The 5th Zhejiang Provincial Collegiate Programming Contest---ProblemE:Easy Task

    http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2969

    全场第一水题。我不知道怎么解释,看代码就好了。。。

    #include<bits/stdc++.h>
    using namespace std;
    int main() {
        int t,n,a[101];
        cin>>t;
        while(t--) {
            cin>>n;
            if(n==0) {
                cin>>a[0];
                cout<<n<<endl;
            }
    
            else {
                for(int i=n; i>=0; i--) {
                    cin>>a[i];
                    a[i]*=i;
                }
                cout<<a[n];
                for(int i=n-1; i>0; i--)
                    printf(" %d",a[i]);
                cout<<endl;
            }
        }
        return 0;
    }
    我会一直在
  • 相关阅读:
    @atcoder
    @loj
    @atcoder
    @gym
    @codeforces
    @atcoder
    @bzoj
    @loj
    Kafka常用命令
    Kafka入门介绍
  • 原文地址:https://www.cnblogs.com/zhien-aa/p/5202917.html
Copyright © 2011-2022 走看看