Skip to content

Instantly share code, notes, and snippets.

@AmaxJ
Created November 13, 2014 22:07
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 AmaxJ/a330c32e8c3cd4dc3a60 to your computer and use it in GitHub Desktop.
Save AmaxJ/a330c32e8c3cd4dc3a60 to your computer and use it in GitHub Desktop.
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