Palindrome Number
Easyjavapythonccppjavascript
Given a non-negative integer N, determine whether it reads the same from left to right and right to left.
Input Format
A single line containing the integer N.
Output Format
Print 1 if N is a palindrome, otherwise print 0.
Example 1
Input
1221
Output
1
Explanation: 1221 remains the same when its digits are reversed.
- 0 <= N <= 1000000000000000000
Submit an attempt to unlock the solution. (Sign in first.)
Related Problems
- Check Prime NumberEasy · java, python, c, cpp, javascriptSolve Problem
- Greatest Common DivisorEasy · java, python, c, cpp, javascriptSolve Problem
- Least Common MultipleEasy · java, python, c, cpp, javascriptSolve Problem