HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Ad-Hoc > problem:


50298 - Coins

Section problems

• 50253 - Timer
• 50294 - Centimeters to Yards
• 50298 - Coins
• 50303 - Pattern
• 50882 - FizzBuzz
• 50322 - Snake Pattern
• 50302 - Paper Scissors Rock
• 50312 - Sales Bar Chart
• 50313 - Pattern Displays
• 50375 - Area of Circles
• 50393 - Palindromic Numbers

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Olympiad 2010. Prepared by: Evis Hoxha. Difficulty Alpha

Coins


Given an amount of n coins. The coins are same. Two people (your program and the opponent) start to take an amount of 1 or 2 coins per turn. After your program takes the coin (1 or 2) for first, then the opponent must also take 1 or 2 coins. The winner is who takes the last coin(s), by leaving no coins for the other. Assume that both players (your program and the opponent) play with the best strategy.

Input
Input consists of an integer n: the number of coins, where 4<=n<=1 000 000.

Output
Show "WIN" if the program can win even if the opponent plays with its best strategy. Show "LOSE" if the program can not win for any strategy.

Input I
5
Output 1
WIN

Input II
172407
Output II
LOSE

Для отправки решений необходимо выполнить вход.

www.contester.ru