Advertisement
here2share

# b_tricky_test.py

Jan 13th, 2025
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. # b_tricky_test.py
  2.  
  3. def test(i):
  4.     if not i % 10:
  5.         low = min(seen)
  6.         for num in range(low, max(seen) + 2):
  7.             if num not in seen:
  8.                 seen.discard(low)
  9.                 return num             
  10.     return (i // 2) + (i + 3)
  11.  
  12. i = 1
  13. pattern = []
  14. seen = set()
  15.  
  16. while 1:
  17.     print(i)
  18.     pattern.append(i)
  19.     seen.add(i)
  20.     i = test(i)
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement