← Back to List

9085번: 더하기 ↗

Solutions

C++14
270 B | 270 chars
#include <iostream>
using namespace std;
long long int N,T,A,S;
int main ()
{
    cin>>T;
    for(int i=0; i<T; i++)
    {
        S=0;
        cin>>N;
        for(int z=0; z<N;z++)
        {
            cin>>A;
            S+=A;
        }
        cout<<S<<endl;
    }
}