| IntPalindrome/ansemenov | IntPalindrome/olya.volodina | ||||
|---|---|---|---|---|---|
| n | 1 | x = int(input()) | n | 1 | x_origin = int(input()) |
| 2 | if x % 10 == 0: | 2 | if x_origin % 10 == 0: | ||
| 3 | print('NO') | 3 | print('NO') | ||
| 4 | exit() | 4 | exit() | ||
| n | 5 | base = x | n | 5 | x = x_origin |
| 6 | rev = 0 | 6 | result = 0 | ||
| 7 | while x > 0: | 7 | while x > 0: | ||
| n | 8 | rev = rev * 10 + x % 10 | n | 8 | result = result * 10 + x % 10 |
| 9 | x = x // 10 | 9 | x = x // 10 | ||
| t | 10 | if base == rev: | t | 10 | print('YES') if x_origin == result else print('NO') |
| 11 | print('YES') | ||||
| 12 | else: | ||||
| 13 | print('NO') | ||||
| Legends | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||