确定整数是否为回文。回文的数量意味着正向顺序(从左到右)和反向顺序(从右到左)是相同的整数。
[En]
Determines whether an integer is a palindrome. The number of palindromes means that the positive order (from left to right) and the reverse order (from right to left) are the same integers.
示例 1:
输入: 121
输出: true
示例 2:
输入: -121
输出: false
解释: 从左向右读, 为 -121 。 从右向左读, 为 121- 。因此它不是一个回文数。
示例 3:
输入: 10
输出: false
解释: 从右向左读, 为 01 。因此它不是一个回文数。
进阶:
你能不将整数转为字符串来解决这个问题吗?