#include <stdio.h>
int main()
{
int t;
scanf("%d", &t);
while (t–)
{
int n, A, B;
scanf("%d%d%d", &n, &A, &B);
char arr[100][101];
for (int i = 0; i < n; i++)
{
scanf("%s", arr[i]);
}
char gw[7] = “EQUINOX”;
long count = 0;
for (int i = 0; i < n; i++)
{
for (int j = 0; j < 7; j++)
{
if (arr[i][0] == gw[j])
{
count++;
}
}
}
long sar = count * A, anu = (n - count) * B;
if (sar > anu)
{
printf("SARTHAK\n");
}
else if (anu > sar)
{
printf("ANURADHA\n");
}
else
{
printf("DRAW\n");
}
}
}
This is the code of this (Contest Page | CodeChef) question.
In this code if i change the (line no. 16) code “long” to “int” then after submitting it is showing wrong answer otherwise correct.
The number of count never exceed “N” or “100”. Then, Why i need to give datatype of “count” as “long”. .