Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
um dos desafios do site rankk.org
'''
If 1 bucket of food feed 2 donkeys for 3 days,
how many buckets are needed to feed 1314 donkeys for 1 day?
donkeys | days | buckets
n | 1 | x
2 | 3 | 1
x = n/2 * 1/3
'''
def bucketsForDonkeys(n):
return (n/2 * 1/3)
print bucketsForDonkeys(1314)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment