Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- k = int(input())
- a = 0
- for i in range(1, k + 1):
- s = str(i)
- for j in range(len(s)):
- if s[j] != s[len(s) - j - 1]:
- break
- else:
- a = a + 1
- print(a)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement