编程介的小学生 2017-08-26 13:48 采纳率: 20.5%
浏览 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 flink cdc无法实时同步mysql数据
  • ¥100 有人会搭建GPT-J-6B框架吗?有偿
  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名