500. Nim Game
EasyGame Theory
There are n stones; players alternately remove 1 to 3 stones, and whoever takes the last stone wins. You move first and both play optimally. Print WIN or LOSE.
Input format
One integer n
Output format
WIN or LOSE
Example 1
Input
4
Output
LOSE
Example 2
Input
1
Output
WIN
Constraints
1 ≤ n ≤ 2³¹ − 1
Read input from standard input and print the answer to standard output. Your code is judged against 5 test cases, most of them hidden.
Loading the MyLoginn IDE…