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: 2015210402087
In contest: 1043

#include<stdio.h>
#include<string.h>
int main()
{
	int i,x,y,l;
	char a[200];
	while(~scanf("%s",a))
	{
		l=strlen(a);
		x=0;
		y=0;
		for(i=1;i<l;i++)
		{
			if(a[i]!=a[l-i])
			{
				x=1;
			}
		}
		for(i=0;i<l-1;i++)
		{
			if(a[i]!=a[l-2-i])
			{
				y=1;
			}
		}
		if(x==1&&y==1)
		{
			printf("zz cry\n");
		}
		else
		{
			printf("zz happy!\n");
		}
	}
}