No.7 Prime Number Game
Problem Statement
You and Eve, who has just learned about prime numbers, came up with a game about prime numbers.
The rules of the game are as follows.
・First, the first player is given a natural number \(N\) that is at least \(2\).
・The player whose turn it is subtracts from \(N\) one of the "prime numbers less than or equal to \(N\) (including \(N\) itself)".
Letting \(N'\) be the resulting number, if \(N'\) becomes \(0\) or \(1\), that player loses.
・After that, \(N'\) becomes the new \(N\), the number is passed to the opponent, and the above is repeated.
You start the game as the first player.
Assume that both players move so as not to lose. Given a natural number \(N\),
return \(Win\) if you can win, and \(Lose\) otherwise.
Input
\(N\)
\(2 \leq N \leq 10000\)
Output
Print Win or Lose.
Print a newline at the end.
Sample
Sample 1
Input
5
Output
Win
From \(5\), subtract \(3\), a prime number less than or equal to \(5\), and pass \(2\) to the opponent.
(If you subtract \(5\), you lose immediately.)
Eve can only subtract \(2\) from it, so you win.
(You may also subtract \(2\) first.)
Sample 2
Input
12
Output
Lose
If Eve chooses the best moves, you will lose.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。