Skip to content

Instantly share code, notes, and snippets.

@CMCDragonkai
Created June 20, 2018 02:51
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 CMCDragonkai/a07e065461bdad06c2ec938a6ba6354a to your computer and use it in GitHub Desktop.
Save CMCDragonkai/a07e065461bdad06c2ec938a6ba6354a to your computer and use it in GitHub Desktop.
Lowest Common Multiple #python
from math import gcd
from functools import reduce
def lcm(numbers):
return reduce(lambda x, y: int((x * y) / gcd(x, y)), numbers, 1)
print(lcm([3,4,2,5,5])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment