Skip to content

Instantly share code, notes, and snippets.

@erkobridee
Created February 3, 2012 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erkobridee/1730067 to your computer and use it in GitHub Desktop.
Save erkobridee/1730067 to your computer and use it in GitHub Desktop.
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