The smallest common multiple of two or more numbers is called the lowest common multiple (LCM). Given a list of integers, find the lowest common multiple.

4 views

1 Answers

def LCM(nums):

nums.sort()

biggest=nums[-l]

multiplier=1

while sum([(multiplier’|,biggest)%num for num in nums])!=0:

multiplier + = 1

return biggest*multiplier

4 views