Skip to content

Instantly share code, notes, and snippets.

@aymanfarhat
Created June 26, 2013 20:35
Show Gist options
  • Save aymanfarhat/5871387 to your computer and use it in GitHub Desktop.
Save aymanfarhat/5871387 to your computer and use it in GitHub Desktop.
def get_total(n,p):
if n < p:
return 0
elif n == p:
return 1
else:
return 1 + get_total(n-2,p)
n = int(raw_input("money:"))
print get_total(n,3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment