Discuss / Python / 回数过滤

回数过滤

Topic source

亦夜

#1 Created at ... [Delete] [Delete and Lock User]
def is_palindrome(n: int):
    s = str(n)
    for n in range(len(s)//2+1):
        if s[n] != s[-(n+1)]:
            return False 
    return True

  • 1

Reply