bool isPalindrome(int x){long res =0;int tmp = x;if(x <0)return false;while(x !=0){
res = res *10+ x %10;
x /=10;}return(int)res == tmp ? true : false;}
回文数判断一个整数是否是回文数。回文数是指正序(从左向右)和倒序(从右向左)读都是一样的整数。bool isPalindrome(int x){ long res = 0; int tmp = x; if (x < 0) return false; while (x != 0){ res = res * 10 + x % 10; x /= 10; } return (int)res == tmp ?