def is_palindrome(n): x = n y = 0 while x != 0 : # 反向求整数 y *= 10 y += (x%10) x //= 10 return y == n
Sign in to make a reply
hcie_zpc