1.

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.

Answer»

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



Discussion

No Comment Found