9回文数

class Solution:
    def isPalindrome(self, x: int) -> bool:
        if x < 0:
            return False
        t=str(x)
        t =t[::-1]
        t=int(t)
        if x==t:
            return True
        else :
            return False
        

猜你喜欢

转载自blog.csdn.net/qq_35290785/article/details/88360347
今日推荐