class Solution {
public:
bool isPalindrome(int x) {
int xx = x;
// 小于0直接false
if (xx < 0) {
return false;
}
int pa = 0;
while (xx) {
pa = pa * 10 + (xx % 10);
xx /= 10;
}
return x == pa;
}
};