Created
November 13, 2014 22:07
-
-
Save AmaxJ/a330c32e8c3cd4dc3a60 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 stamps(n): | |
fives = 0 | |
twos = 0 | |
ones = 0 | |
if (n / 5) > 0: | |
fives = (n - (n % 5)) / 5 | |
left = n % 5 | |
twos = (left - (left % 2)) / 2 | |
ones = left % 2 | |
else: | |
twos = (n - (n % 2)) / 2 | |
ones = n % 2 | |
return fives, twos, ones |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment