#include<iostream>
using namespace std;
int main()
{ long long int t,n,sum;
cin>>t;
while(t--)
{
cout<<endl;
sum=0;
cin>>n;
long long int a[n];
for(int i=0;i<n;i++)
{ cin>>a[i];
sum=(sum+a[i])%n ;
}
if(sum%n==0)
cout<<"YES"<<endl ;
else
cout<<"NO" <<endl;
}
return 0;
}
using namespace std;
int main()
{ long long int t,n,sum;
cin>>t;
while(t--)
{
cout<<endl;
sum=0;
cin>>n;
long long int a[n];
for(int i=0;i<n;i++)
{ cin>>a[i];
sum=(sum+a[i])%n ;
}
if(sum%n==0)
cout<<"YES"<<endl ;
else
cout<<"NO" <<endl;
}
return 0;
}
No comments:
Post a Comment