Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def solvebig():
- for num_nuggets in range(1,60):
- #can we make num_nuggets? ind indicates if we can
- ind = False
- for a in range(0, num_nuggets + 1):
- for b in range(0, num_nuggets + 1):
- for c in range(0, num_nuggets + 1):
- if 6*a + 9*b + 20*c == num_nuggets:
- ind = True
- #what streak of achievable combos are we on?
- if ind:
- streak += 1
- else:
- streak = 0
- #if its the 6th, we're done
- if streak == 6:
- return num_nuggets - 6
Advertisement
Add Comment
Please, Sign In to add comment