#K8641. Palindrome Number Check
Palindrome Number Check
Palindrome Number Check
Given a non-negative integer n, determine whether it is a palindrome.
A palindrome number is a number that reads the same forwards and backwards. Mathematically, if we denote the digits of n as \(d_k d_{k-1} \ldots d_0\), then n is a palindrome if:
\(d_k d_{k-1} \ldots d_0 = d_0 \ldots d_{k-1} d_k\)
Your task is to check the given number and print True
if it is a palindrome and False
otherwise.
Note: The input is taken from standard input and output should be printed to standard output.
inputFormat
The input consists of a single line containing a non-negative integer n (0 ≤ n ≤ 109).
outputFormat
Print True
if the given number is a palindrome. Otherwise, print False
.
121
True