mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
ed2de2e423
1500-1599
23 lines
317 B
C++
23 lines
317 B
C++
#include<iostream>
|
|
using namespace std;
|
|
int main()
|
|
{
|
|
int size;
|
|
cin>>size;
|
|
for(int l=0;l<size;l++)
|
|
{
|
|
int n;
|
|
cin>>n;
|
|
int sum=0;
|
|
for(int i=0;i<n;i++)
|
|
{
|
|
int temp;
|
|
cin>>temp;
|
|
sum+=temp;
|
|
}
|
|
if(sum>=0)
|
|
cout<<sum<<endl;
|
|
else cout<<0<<endl;
|
|
}
|
|
}
|