Created
June 26, 2013 20:35
-
-
Save aymanfarhat/5871387 to your computer and use it in GitHub Desktop.
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
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