Describe your bug
Program is working is working fne but it is showing error in submitting
Not accepting answer though it is giving the correct output but it is different from the solution.
Program is working is working fne but it is showing error in submitting
Not accepting answer though it is giving the correct output but it is different from the solution.
Please share your code.
//Solution as follows
#include <stdio.h>
int main()
{
int t, count1 = 0, count2 = 0;
scanf(ā%dā, &t);
while(t--)
{
int A[10];
for(int i = 0; i < 10; i++)
{
scanf("%d", &A[i]);
if(i % 2 == 0)
count1 += A[i];
else
count2 += A[i];
}
if (count1 > count2)
{
printf("1\n");
}
else if (count1 < count2)
{
printf("2\n");
}
else
{
printf("0\n");
}
}
return 0;
}