HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Albanian National Olympiads in Informatics > problem:


2010-1. 50298 - Coins

Volume problems

• 2010-1. 50298 - Coins
• 2010-2. 50299 - Median
• 2010-3. 50300 - Matrix
• 2012-1. 50544 - Stock market
• 2012-2. 50545 - Diet
• 2012-3. 50721 - Palindrome
• 2012-4. 50680 - Triangle
• 2012-5. 50551 - Camelot
• 2013-1. 50591 - Leap year

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