Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def f(x, m):
- if x < 13:
- return m % 2 == 0
- elif m == 0:
- return 0
- arr = [f(x - 1, m - 1)]
- if x % 2 == 0:
- arr.append(f(x // 2, m - 1))
- return any(arr) if m % 2 == 1 else all(arr)
- # for s in range(13, 100):
- # if f(s, 2) and not (f(s, 1)):
- # print(s)
- # for s in range(13, 100):
- # if not (f(s, 1)) and f(s, 3):
- # print(s)
- # for s in range(13, 100):
- # if not (f(s, 2)) and f(s, 4):
- # print(s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement