Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
To make sure
def make_bricks(small, big, goal):
if goal - 5*big > small: # small + 5*big < goal (impossible)
return False
else: # small + 5*big >= goal (partial possible)
if goal%5 > small:
return False
return True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment