fork download
  1. num = int(input())
  2. def check_num(number):
  3. check = number+1
  4. while True:
  5. str_check = str(check)
  6. if str_check == ''.join(str_check[::-1]):
  7. return str_check
  8. else:
  9. check+=1
  10. print(check_num(num))
  11.  
  12. print("\nThe proper answer [Output, stdout] is:\n\n818\n2222\n\n not 3, honey! ;-)")
Success #stdin #stdout 0.01s 28384KB
stdin
2
808
2133
stdout
3

The proper answer [Output, stdout] is:

818
2222

 not 3, honey! ;-)