um dos desafios do site rankk.org
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
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