Skip to content

Instantly share code, notes, and snippets.

@lettergram
Created October 25, 2015 21:17
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 lettergram/08a15afe3ac51e8b4c7d to your computer and use it in GitHub Desktop.
Save lettergram/08a15afe3ac51e8b4c7d to your computer and use it in GitHub Desktop.
# Finds the lowest common multiple
def lcm(deck):
p = 1
for i in range(0, len(deck)):
p = p * int(deck[i] / gcd(p, deck[i]))
return p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment