Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def f(s, cnt):
- if s >= 43 and cnt - 1 == 2:
- return 1
- if s >= 43 and cnt - 1 < 2:
- return 0
- if s < 43 and cnt - 1 == 2:
- return 0
- A = f(s + 1, cnt + 1)
- B = f(s + 2, cnt + 1)
- C = f(s * 2, cnt + 1)
- if cnt % 2 == 0:
- return A or B or C
- else:
- return A and B and C
- for s in range(43):
- A = f(s + 1, 0) or 2 * (s + 1) >= 43
- B = f(s + 2, 0) or 2 * (s + 2) >= 43
- C = f(s * 2, 0) or 4 * s >= 43
- if A and B and C:
- print(s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement