rolfvanoven

AoC 2022 dag 6

Dec 6th, 2022
553
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. alles = 'zcfzfwzzqfrljwzlrfnpqdbhtmscgvjw'
  2.  
  3.  
  4. zoeken = True
  5. nubij = 13
  6.  
  7.  
  8. while zoeken:
  9.   deze = True
  10.   for x in range(13):
  11.     for y in range(13-x):
  12.       if alles[nubij-y] == alles[nubij - y - (x+1)]:
  13.         deze = False
  14. #      print(alles[nubij], 'is', alles[nubij - (x+1)])
  15.   if deze:
  16.     zoeken = False
  17.     print(nubij+1)
  18.   else:
  19.     nubij += 1
Advertisement
Add Comment
Please, Sign In to add comment