update 7
This commit is contained in:
parent
f3d682ae9b
commit
a8898346c5
@ -7,7 +7,7 @@ class Solution:
|
||||
reverse_str_x = str_x[::-1]
|
||||
if reverse_str_x[-1] == "-":
|
||||
reverse_str_x = "-" + reverse_str_x[:-1]
|
||||
return int(reverse_str_x)
|
||||
return int(reverse_str_x) if int(reverse_str_x) <= 2**31 - 1 else 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Loading…
x
Reference in New Issue
Block a user