online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
''' Given an integer x, return true if x is palindrome integer. An integer is a palindrome when it reads the same backward as forward. For example, 121 is a palindrome while 123 is not. https://leetcode.com/problems/palindrome-number/ ''' def is_palindrome(x: int) -> bool: s = str(x) return s == s[::-1] def is_palindrome(x: int) -> bool: s = str(x) return s[:len(s)//2] == s[:(len(s)-1)//2:-1] def is_palindrome(x: int) -> bool: s = str(x) return all(a == b for a,b in zip(s, reversed(s))) def is_palindrome(x: int) -> bool: s = str(x) return all(s[i] == s[-i-1] for i in range(len(s)//2)) def is_palindrome(x: int) -> bool: s = str(x) for i in range(len(s)): if s[i] != s[-i-1]: return False return True def is_palindrome(x: int) -> bool: s = str(x) for i in range(0, len(s)//2): if s[i] != s[-i-1]: return False return True def is_palindrome(x: int) -> bool: s = str(x) i, j = 0, len(s)-1 while i < j: if s[i] != s[j]: return False i += 1 j -= 1 return True def is_palindrome(x: int) -> bool: s = str(x) i = 0 while i < len(s)//2: if s[i] != s[-i-1]: return False i += 1 return True def is_palindrome(x: int) -> bool: y, z = 0, x while z > 0: y = 10*y + z % 10 z //= 10 return y == x

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue