1. Description
2. Solution
代码语言:javascript复制class Solution {
public:
bool isPalindrome(int x) {
if(x < 0) {
return false;
}
int m = x;
int y = 0;
while(m) {
y = y * 10 m % 10;
m /= 10;
}
return x == y;
}
};