Palindrome Number
Palindrome Number
A number is a palindrome when it reads the same forwards and backwards. 121 and 1221 are palindromes; 123 and 10 are not.
Given a non-negative integer N, print Yes if it is a palindrome and No if it is not.
Every single-digit number, including 0, is a palindrome.
Reverse the number the usual way and compare the reversed value with the original. Keep a copy of the original before you destroy it in the loop.
A single line containing one integer N.
The word Yes or the word No.
0 <= N <= 10^18
121
Yes
Reversing 121 gives 121 again.
Submit runs your code against 6 test cases — the 1 shown above plus 5 hidden ones covering the awkward cases. Run sample just tries the first example, which is usually what you want while you are still working it out.