游客 Signup | Login
中文 | En

3686 - 简单博弈

小学生A与B都是传说中智商高达250的优秀好青年,他们熟知高数与马克思主义哲学。按照一般的题目的尿性来

看,接下来他们会

玩一个游戏,而事实正是如此。。小学生A与小学生B在玩一个扔石子游戏,一堆石子n个,他们要把这些石子扔

完。谁扔掉最后一个谁赢。

一人一次,一次最多只能扔5个,不能不扔,而小学生智商太高,所以他们会以最优的策略进行扔。

由于小学生A的名字比B厉害,所以小学生A先扔,小学生A的哥哥大学生想知道A能不能赢。

Input

n (n<=1000000)

Output

如果能赢,输出 "ha ha!!!" 如果不能赢,输出"do not escape after school!"

Examples

Input

3
6
2

Output

ha ha!!!
do not escape after school!
ha ha!!!

Solution C

#include<stdio.h>
int main()
{
	int n;
	while(scanf("%d",&n)==1)
	{
		if(n%6!=0)printf("ha ha!!!\n");
		else printf("do not escape after school!\n");
	}
	return 0;
}

Solution C++

#include <stdio.h>
int main()
{
	int n;
	while(scanf("%d",&n)!=EOF)
	{
		if(n%6==0)
		printf("do not escape after school!\n");
		else
		printf("ha ha!!!\n");
	}
	return 0;
}
Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题