题目:https://leetcode.com/problems/palindrome-number/#/description
代码:
bool isPalindrome(int x) {
if(x < 0)
return false;
int t = x;
double s = 0;
while(x > 0){
s = s*10 + x%10;
x = x/10;
}
if((int)s == t)
return true;
return false;
}