~/algor $ cat contests/round-5/C
C. Three-digit palindrome
Problem C
ICPC rules
1000 ms
64 MB
A three-digit positive integer is given. Check whether the statement is true: “ reads the same from left to right and from right to left”. For example, and are such numbers.
Input
One three-digit positive integer .
Output
One integer: if the statement is true, otherwise .
Note
Examples
Input #1
121
Output #1
1
Input #2
123
Output #2
0