#include <stdio.h>
#include <string.h>
int func(int,int,char *);
int main()
{
int n,len;
char s[100];
scanf("%d",&n);
getchar();
while(n--)
{
gets(s);
len = strlen(s);
if(func(0,len-1,s))
printf("Yes!\n");
else
printf("No!\n");
}
return 0;
}
int func(int begin,int end,char *s)
{
if(begin == end || begin == end-1)
return 1;
else
{
if(s[begin]==s[end])
func(begin+1,end-1,s);
else
return 0;
}
}
#job 42
最新推荐文章于 2022-12-23 22:19:42 发布