close
class Solution: def reverse(self, x: int) -> int: x = int(str(x)[::-1]) if x >= 0 else - int(str(-x)[::-1]) return x if x < 2147483648 and x >= -2147483648 else 0
文章標籤
全站熱搜
class Solution: def reverse(self, x: int) -> int: x = int(str(x)[::-1]) if x >= 0 else - int(str(-x)[::-1]) return x if x < 2147483648 and x >= -2147483648 else 0
留言列表