Skip to content

Commit 6b167cb

Browse files
math challenges: starting...
1 parent ed565d5 commit 6b167cb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
class Solution:
2+
def isPalindrome(self, x: int) -> bool:
3+
if x < 0:
4+
return False
5+
6+
temp = str(x)
7+
8+
return int(temp[::-1]) == x

0 commit comments

Comments
 (0)