Block Game
Statement
Goal
The citizens of Byteland regularly play a game. They have blocks each denoting some integer from 0 to 9. These are arranged together in a random manner without seeing to form different numbers keeping in mind that the first block is never a 0. Once they form a number they read in the reverse order to check if the number and its reverse are the same. If both are the same, then the player wins. We call such a number a palindrome.Ash happens to see this game and wants to simulate the same in the computer. As a first step, he wants to take an input from the user, check if the number is a palindrome, and declare if the user wins or not.
Input
An integer N.
Output
Constraints
1 <= N <= 20000
Example
Input
131
Output
wins
Game modes
Fastest, Shortest
Test cases
Small Wins Test
Input
131
Output
wins
Validator 1 Validator
Input
404
Output
wins
Small Loses Test
Input
31
Output
loses
Validator 2 Validator
Input
243
Output
loses
Medium Test
Input
666
Output
wins
Validator 3 Validator
Input
616
Output
wins
Large Test
Input
10001
Output
wins
Validator 4 Validator
Input
9014
Output
loses
Solution language
Solution
Stub generator input