BPL Mubarak

Limits: 1s, 512 MB

Bangladesh Premier League Sylhet for the first time. First, match Sylhet Sixers vs Dhaka Dynamites. Dhaka Dynamites’s Batting is too Good. There are many people are come Sylhet International Stadium to see this match, you are one of them.


This is a companion discussion topic for the original entry at https://toph.co/p/bpl-mubarak

#include<stdio.h>
#include<string.h>
int main()
{
int t,i,b,c,o;
scanf("%d",&t);
char s[100];
while (t–)
{
scanf("%s",s);
c=0;
for (i=0;s[i]!=’\0’;i++)
{
if (s[i]==‘N’ ||s[i]==‘W’ ||s[i]==‘D’)
continue;
else
c++;
}
if (c<=6)
{
if (c==1)
printf(“1 BALL\n”);
else if (c==6)
printf(“1 OVER\n”);
else
printf("%d BALLS\n",c);
}
else if (c>6)
{
o=c/6;
b=c%6;
if (o>=1&&b>=1)
{
if (o==1)
{
if (b==1)
printf(“1 OVER 1 BALL\n”);
else
printf(“1 OVER %d BALLS\n”,b);
}
else
{
if (b==1)
printf("%d OVERS 1 BALL\n",o);
else
printf("%d OVERS %d BALLS\n",o,b);
}
}
}
}
}

What’s the problem? I can’t understand