编程介的小学生 2017-08-26 13:48 采纳率: 0.2%
浏览 828
已采纳

Number Game

Once I was asked to play a game with a stranger,the rule of the game was as follows. I and the stranger had different rules. First there was a number n0(1 < n0 < 108),i was asked to choose a number a which is larger or equal to n0 but less or equal to n02,and then the stranger chose a number b according to the number I chose, a/b (a mod b=0) should equal to qk,in which q is a prime number and k is positive, and b should not equal to a. Then I chose number based on the stranger's number(regard the b as n1) on my own rule again, we chose numbers in turns in different rules. When I chose 1990, then I won the game, when the stranger chose number 1, then he won the game.

For example, when n0 = 2, then I could choose 2,3,4 as a, then the stranger can always chose 1 at his first round(because 2,3 are prime numbers and 4 = 22), so the stranger won the game.

Not long, I found the result of the game is in line with the initial number n0, so I want to know before I play this game, will I won this game with the number n0, or is there sometimes nobody will win the game, can you tell me?

Input

There no more than 10000 cases, proceed to the end of file.

In each line there is a single number n0(1 < n0 < 108).

Output

For each case, if I will win, then output "I will win!!"(without the quotes),if the stranger will win, then output "The stranger will win!!"(without the quotes),if nobody can win the game, output "It's an endless game!!"(without the quotes).

Sample Input

2
7
345
Sample Output

The stranger will win!!
It's an endless game!!
I will win!!

  • 写回答

1条回答 默认 最新

  • threenewbee 2017-09-10 00:44
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?