把数字看成字符串,首位相比 public: /** * * @param x int整型 * @return bool布尔型 */ bool isPalindrome(int x) { // write code here bool flag = true; if(x<0) { flag = false; } else { string num_str = std::to...