编程介的小学生 2017-08-26 13:48 采纳率: 20.3%
浏览 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 怎样才能让鼠标沿着线条的中心线轨迹移动
  • ¥60 用visual studio编写程序,利用间接平差求解水准网
  • ¥15 Llama如何调用shell或者Python
  • ¥20 谁能帮我挨个解读这个php语言编的代码什么意思?
  • ¥15 win10权限管理,限制普通用户使用删除功能
  • ¥15 minnio内存占用过大,内存没被回收(Windows环境)
  • ¥65 抖音咸鱼付款链接转码支付宝
  • ¥15 ubuntu22.04上安装ursim-3.15.8.106339遇到的问题
  • ¥15 blast算法(相关搜索:数据库)
  • ¥15 请问有人会紧聚焦相关的matlab知识嘛?