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) // 2):
- if (s[j] != s[len(s) -1 - j]):
- break
- else:
- a = a +1
- print(a)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement