IntPalindrome/Anya2699 | IntPalindrome/Beka00 | ||||
---|---|---|---|---|---|
f | 1 | x = int(input()) | f | 1 | x = int(input()) |
n | 2 | y = x | n | 2 | tmp = x |
3 | i = 0 | 3 | rev = 0 | ||
4 | while x > 0: | 4 | while x > 0: | ||
n | 5 | m = x % 10 | n | 5 | d = x % 10 |
6 | i = i * 10 + m | 6 | rev = rev * 10 + d | ||
7 | x = x // 10 | 7 | x = x // 10 | ||
t | 8 | if y == i: | t | 8 | if tmp == rev: |
9 | print('YES') | 9 | print('YES') | ||
10 | else: | 10 | else: | ||
11 | print('NO') | 11 | print('NO') |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|