A deck of cards
In a small deck of cards, there are 36 cards. Each card has a suit:
♦️ Diamonds
♣️ Clubs
❤️ Hearts
♠️ Spades
Let’s play a game.
I mix the deck for you and you start opening the cards one by one. If two consecutive cards have the same suit, you lose, if you manage to reach the end of the deck you win.
The program input contains 36 cards. Each one first has its suit (D for diamonds, C for clubs, H for hearts, S for spades), followed by a number (6, 7, 8, 9, 10) or another letter (A, K, Q, J).
The program should print Victory
if you’ll win and Loss
otherwise.
Input | Output |
---|---|
HQ | Loss |
Constraints
Time limit: 2 seconds
Memory limit: 512 MB
Output limit: 1 MB