Skip to content

Instantly share code, notes, and snippets.

@TRManderson
Last active December 16, 2015 07:49
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 TRManderson/5401637 to your computer and use it in GitHub Desktop.
Save TRManderson/5401637 to your computer and use it in GitHub Desktop.
Solution to Reddit's r/dailyprogrammer challenge #121 [Easy] (Bytelandian Exchange 1)
#http://www.reddit.com/r/dailyprogrammer/comments/19mn2d/030413_challenge_121_easy_bytelandian_exchange_1/
def coins (inputCoin):
if inputCoin == 0:
return 1
else:
return coins(inputCoin//2)+coins(inputCoin//3)+coins(inputCoin//4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment