ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Разделы > Ad-Hoc > задача:


50298 - Coins

Задачи раздела

• 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

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Olimpiada Kombetare 2010. Pergatiti: Evis Hoxha. Сложность Альфа

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