Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def f(x, y, h):
- if x + y >= 77:
- if h % 2 == 0:
- return 1
- else:
- return 0
- if x + y >= 77 and h > 10:
- return 0
- A = f(x, y + 1, h + 1)
- B= f(x, y * 2, h + 1)
- C = f(x + 1, y, h + 1)
- D = f(x * 2, y, h + 1)
- if h % 2 == 1:
- return A or B or C or D
- else:
- return A and B and C and D
- for S in range(68, 0, -1):
- print(S)
- if f(8, S, 0):
- print(S)
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement