Policies & Guidelines

LEAST_COMMON_MULTIPLE

Calculate the least common multiple

Description

Given an array of numbers, calculates the least common multiple for them.

Function signature

LEAST_COMMON_MULTIPLE(array: Array) => Number

Parameter

Description

Array

Array of numeric values

Examples

Formula

Return value

LEAST_COMMON_MULTIPLE([10, 100, 1000])

1000

LEAST_COMMON_MULTIPLE([14, 21, 42])

42

LEAST_COMMON_MULTIPLE([12, 9, 15])

180