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