프로그램 명: stfd_game
제한시간: 1 초

Carl and Ellie are in the midst of another adventure; this time, it is a road trip through Canada! They've just arrived in Saskatchewan [insert rectangular shape here], right in the middle of the Canadian prairies, and, to their horror, have discovered that all the rumours about it being dreadfully at are true. Suddenly, the warnings their Canadian friends gave them prior to the trip spring back to mind, such as:

It's so flat, a boy can watch his dog run away!

Or:

It's so flat, it's impossible to jump to your death!

As the driver, Carl is worried about falling asleep at the wheel and has decided to come up with a game to relieve the boredom. As a conscientious driver, he doesn't want the game to be too distracting|the roads here are unerringly straight, so it's easy to lose track of motion|so the rules are simple:

For example, suppose Carl picks the number 50. He subtracts off number 5, leaving 45 Ellie subtracts 5, leaving 28. Carl subtracts 8 leaving 20. Finally, Ellie subtracts off 20 , leaving 0, and wins! Frankly, Ellie would rather sleep than play this game, so she has reprogrammed the GPS (which isn't necessary in this region, anyway) to play for her instead. Her method of choosing a number is straightforward:

Carl needs your help! To help stay motivated playing this game, he would like to know if there exists a winning strategy for him, given the numbers N and a1, a2, a3, ... , a20.

입력

Each input case begins with the number N on a line by itself; the next line contains the numbers a1, a2,.., a20, separated by spaces.

출력

For each test case, print "Carl can win" or "Carl can't win".

Carl can't win

In this example, since Carl chooses N to be 42, it turns out that he has no winning strategy. (Indeed, whichever number he initially subtracts off,Ellie will subtract off a number leaving 21 for Carl. Then whatever number Carl subtracts off next, Ellie will be left with a number between 1 and 20, and she wins!

입출력 예

입력

42
20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1

출력

Carl can't win
출처:standford/2009/

[질/답] [제출 현황] [푼 후(0)]
[ 채 점 ] [홈으로]  [뒤 로]