Let Code/riteコード-ファイル番号-python
質問する

に答える
x
, return true
if x
is palindrome integer. 121
is palindrome while 123
is not. -2 ^ 31 <= x <= 2^31 -1
コード#コード#
# leetcode, easy : Pailndrome Number, python3
class Solution:
def isPalindrome(self, x: int) -> bool:
return True if str(x) == str(x)[::-1] else False
結果



ソース&ハーブ
LeetCode
github
Reference
この問題について(Let Code/riteコード-ファイル番号-python), 我々は、より多くの情報をここで見つけました https://velog.io/@cosmos/LeetCode릿코드-Pailndrome-Number-pythonテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol