Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from functools import lru_cache
- # +1, *3
- # 65 <= WIN <= 100
- @lru_cache(None)
- def F(a):
- if (65 <= a + 1 <= 100) or (65 <= a * 3 <= 100):
- return 1
- lst = [ ]
- if a + 1 <= 100:
- lst.append( F(a + 1) )
- if a * 3 <= 100:
- lst.append( F(a * 3) )
- if min(lst) > 0:
- return -max(lst)
- return 1 - max([x for x in lst if x < 0])
- for s in range(1, 65):
- if F(s) == -2:
- print(s)
Advertisement
Add Comment
Please, Sign In to add comment