Code: Select all
# include <stdio.h>
# include <string.h>
# include <ctype.h>
int main()
{
int t,i;
char team[25], judge[25],teamEdit[25];
scanf("%d\n",&t);
for(i=1;i<=t;i++)
{
gets(team);
gets(judge);
if(!strcmp(team,judge)) printf("Case %d: Yes\n",i);
else
{
int j=0,k,lt=strlen(team);
for(k=0;k<lt;k++)
{
if(!isspace(team[k]))
{
teamEdit[j]=team[k];
j++;
}
}
if(!strcmp(teamEdit,judge)) printf("Case %d: Output Format Error\n",i);
else printf("Case %d: Wrong Answer\n",i);
}
}
return 0;
}