Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def solvebig():
- x = 0
- for num_nuggets in range(1, 60):
- for a in range(0, num_nuggets+1):
- for b in range(0, num_nuggets - a + 1):
- for c in range(0, num_nuggets - a - b +1):
- tot_nuggets = 6*a + 9*b + 20*c
- if tot_nuggets == num_nuggets:
- x = x + 1
- print num_nuggets
- num_nuggets += 1
- if x == 6: #any streak greater than 6 means a possible combo
- #for all future numbers
- return num_nuggets - 6
- elif a == num_nuggets:
- x = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement