static const auto _____ = []() { ios::sync_with_stdio(false); cin.tie(nullptr); return nullptr; }(); class Solution { public: bool isPalindrome(int x) { if(x<0) return false; int y = x,z=0; while(y){ z*=10; z+=(y%10); y=y/10; } if(x==z) return true; return false; } };