Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = 2
- def win1(x, S):
- return (x + 1 + S >= 44 or 2*x +S >= 44 or 2*S + x >= 44 ) and x + S < 44
- def loss1(x, S):
- return not(win1(x, S)) and win1(x, S + 1) and win1(x*2,S) and win1(x,S*2)
- def win2(x, S):
- return loss1(x, S +1) or loss1(x*2,S) or loss1(x,S*2)
- for S in range(1, 44):
- # if win1(x, S):
- # print(S) # min = 21
- if win2(x, S):
- print(S) # max = 19
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement