题目链接
easy题,没有奇奇怪怪的条件限制
class Solution{
public boolean isPalindrome(int x){
if(x<0) return false;
//if(x<10) return true;
int num = x;
int ans = 0;
while(x != 0){
ans =ans*10 + x%10;
x = x/10;
}
return ans == num;
}
}