Created
October 25, 2015 21:17
-
-
Save lettergram/08a15afe3ac51e8b4c7d 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
# 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