回文数字,比较简单
class Solution { public: bool isPalindrome(int x) { if(x<0)return false; int y=x; int z=0; while(y>0) { int k=y%10; z=z*10+k; y=y/10; } if(z==x)return true; else return false; } };