Advertisement
Zuneve

Untitled

Apr 29th, 2024
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. def f(x, m):
  2. if x < 13:
  3. return m % 2 == 0
  4. elif m == 0:
  5. return 0
  6. arr = [f(x - 1, m - 1)]
  7. if x % 2 == 0:
  8. arr.append(f(x // 2, m - 1))
  9. return any(arr) if m % 2 == 1 else all(arr)
  10.  
  11.  
  12. # for s in range(13, 100):
  13. # if f(s, 2) and not (f(s, 1)):
  14. # print(s)
  15. # for s in range(13, 100):
  16. # if not (f(s, 1)) and f(s, 3):
  17. # print(s)
  18. # for s in range(13, 100):
  19. # if not (f(s, 2)) and f(s, 4):
  20. # print(s)
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement