my code for problem SANSKAR gives wrong answer. how?

#include<stdio.h>
int main()
{
int T,N,K,SUM,NUM;
scanf("%d",&T);
if(T>=1&&T<=10)
{
while(T–)
{
scanf("%d %d",&N,&K);
if(N>=1&&N<=21&&K>=1&&K<=8)
{
SUM=0;
while(N–)
{
scanf("%d",&NUM);
if(NUM>=0&&NUM<=100000)
SUM+=NUM;
}
if(SUM%K==0)
{
printf(“yes\n”);
}
else
{
printf(“no\n”);
}
}
}
}
return 0;
}

you are not reading the problem properly , entirely wrong logic . Also never post your code anywhere on forum .

1 Like

you cannot include your code in your question during an ongoing contest…
discuss.codechef.com/questions/18662/does-codechef-have-any-code-of-conduct

1 Like

Undeleted…