#include <stdio.h>
#include <stdlib.h>
#include <string.h>
main()
{
char t1[101]={0},t2[101]={0};
int times,j;
while(scanf("%d",×)!=EOF){
for(int i=1;i<=times;++i){
scanf("%s",t1);
for( j=0 ; j<(strlen(t1)) ; j++)
t2[strlen(t1)-j-1]=t1[j];
for( j=0 ; j<strlen(t1) ; ++j )
if(t1[j]!=t2[j])
break;
if(j>=strlen(t1))
printf("yes\n");
else
printf("no\n");
for(int l=1;l<=101;l++)
t1[l]=0;
for(int l=1;l<=101;l++)
t2[l]=0;
}
}
return 0;
}
我自己測試都沒問題
他說輸出多餘文字:yes