Sichanov

next_happy_year_set

Sep 17th, 2021
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.13 KB | None | 0 0
  1. year = int(input())
  2.  
  3. while True:
  4.     year += 1
  5.     if len(str(year)) == len(set(str(year))):
  6.         print(year)
  7.         break
Advertisement
Add Comment
Please, Sign In to add comment