Advertisement
HuanMatus

Untitled

Jan 30th, 2022
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. x = 2
  2. def win1(x, S):
  3. return (x + 1 + S >= 44 or 2*x +S >= 44 or 2*S + x >= 44 ) and x + S < 44
  4. def loss1(x, S):
  5. return not(win1(x, S)) and win1(x, S + 1) and win1(x*2,S) and win1(x,S*2)
  6. def win2(x, S):
  7. return loss1(x, S +1) or loss1(x*2,S) or loss1(x,S*2)
  8.  
  9.  
  10. for S in range(1, 44):
  11. # if win1(x, S):
  12. # print(S) # min = 21
  13. if win2(x, S):
  14. print(S) # max = 19
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement