#K12931. Check Palindrome Number Without String Conversion
Check Palindrome Number Without String Conversion
Check Palindrome Number Without String Conversion
Given a non-negative integer ( n ), determine whether it is a palindrome without converting the integer to a string. A number is considered a palindrome if it reads the same forward and backward. Mathematically, if ( n = d_m10^m + d_{m-1}10^{m-1} + \cdots + d_0 ), then ( n ) is a palindrome if ( n = d_010^m + d_1 10^{m-1} + \cdots + d_m ). Your task is to implement this check and output either True or False accordingly.
inputFormat
The input consists of a single non-negative integer read from standard input.
outputFormat
Output a single line: 'True' if the given number is a palindrome and 'False' otherwise.## sample
121
True