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

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


50298 - Coins

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

• 50366 - Student Averages (2 Grades)
• 50357 - Convert Euros into Dollars
• 50466 - Drawing Square From Stars
• 50351 - Convert inches to cm
• 50356 - Hours Passed
• 50350 - Fahrenheit to Celsius
• 50355 - Bills of City Water Company
• 50467 - Random Numbers
• 50298 - Coins
• 50591 - Viti i brishte
• 50312 - Sales Bar Chart
• 50313 - Pattern Displays
• 50393 - Palindromic Numbers
• 50375 - Area of Circles
• 50325 - How much time passed?
• 50580 - Sa dite kane kaluar?

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

Если у вас есть предложения или пожелания по работе 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