#include<stdio.h>
int main()
{
long long int t , n , i ,sum ;
scanf("%lld", &t);
while(t--)
{
sum=0;
printf("\n");
scanf("%lld",&n);
long long int a[n];
for (i=0;i<n;i++)
{
scanf("%lld",&a[i]);
sum =sum+a[i];
sum=sum%n;
}
if(sum==0)
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
int main()
{
long long int t , n , i ,sum ;
scanf("%lld", &t);
while(t--)
{
sum=0;
printf("\n");
scanf("%lld",&n);
long long int a[n];
for (i=0;i<n;i++)
{
scanf("%lld",&a[i]);
sum =sum+a[i];
sum=sum%n;
}
if(sum==0)
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
No comments:
Post a Comment