Find the least common multiple of an array of numbers
#!/usr/bin/python3
import sys
from math import gcd
def lcm_list(nums):
from functools import reduce
def lcm(a, b):
return a * b // gcd(a, b)
return reduce(lcm, nums)
nums = list(map(int, sys.argv[1:]))
print(lcm_list(nums))
