CFRS05-Editorial

Problem Link:-Sum
setter:- @iharshit
difficulty:-easy
code:-

 #include <iostream>
using namespace std;

int main()
{
	int t;
	cin>>t;
	for(int i=1;i<=t;i++)
	{
	    int n;
	    cin>>n;
	    long long arr[n];
	    long long sum=0;
	    for(int j=0;j<n;j++)
	    {
	        cin>>arr[j];
	    }
	    for(int k=0;k<n;k++)
	    {
	        sum=sum+arr[k];
	    }
	    cout<<sum<<endl;
	    sum=0;
	}
	return 0;
}