Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def is_pali(x):
- y = str(x)
- if y == y[::-1]:
- return True
- return False
- a = int(raw_input())
- for i in xrange(a):
- b = int(raw_input()) +1
- while 1:
- if is_pali(b):
- print b
- break
- b+=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement