Start: Dec, 27, 2015 17:15:00
2015年秋学期《程序设计基础》第三次上机考试
End: Dec, 27, 2015 20:45:00
Time elapsed:
Time remaining:

Problem_ID: E
Result: Accepted
Time: 1ms
Memory: 1092kB
Author: 2015210405034
In contest: 1043

#include<stdio.h>
#include<string.h>
int main()
{

	char s[300];
while(~scanf("%s",&s))
{


int len=strlen(s);
int i;

     len--;
     for(i=0;i<len;i++)
      {
		  if(s[i]!=s[len-1-i])
         {
			 goto loop1;
		  }
      }
	   printf("zz happy!\n");
	   continue;
loop1:
	 // printf("1111111\n");
	  for(i=1;i<len/2+1;i++)
      {
		  if(s[i]!=s[len-i+1])
            goto loop;
      }
	  printf("zz happy!\n");
	   continue;
loop:
	  printf("zz cry\n");

}
}