fix(curriculum): fix on math equation display (#46632)
* fix(curriculum): fix on math equation display * Update curriculum/challenges/english/10-coding-interview-prep/rosetta-code/least-common-multiple.md Co-authored-by: Muhammed Mustafa <MuhammedElruby@gmail.com> Co-authored-by: Muhammed Mustafa <MuhammedElruby@gmail.com>pull/46636/head
parent
ac7388dd1b
commit
70f0bdf443
|
@ -8,7 +8,11 @@ dashedName: least-common-multiple
|
|||
|
||||
# --description--
|
||||
|
||||
The least common multiple of 12 and 18 is 36, because 12 is a factor (12 × 3 = 36), and 18 is a factor (18 × 2 = 36), and there is no positive integer less than 36 that has both factors. As a special case, if either *m* or *n* is zero, then the least common multiple is zero. One way to calculate the least common multiple is to iterate all the multiples of *m*, until you find one that is also a multiple of *n*. If you already have *gcd* for [greatest common divisor](<https://rosettacode.org/wiki/greatest common divisor>), then this formula calculates *lcm*. ( \\operatorname{lcm}(m, n) = \\frac{|m \\times n|}{\\operatorname{gcd}(m, n)} )
|
||||
The least common multiple of 12 and 18 is 36, because 12 is a factor (12 × 3 = 36), and 18 is a factor (18 × 2 = 36), and there is no positive integer less than 36 that has both factors. As a special case, if either $m$ or $n$ is zero, then the least common multiple is zero. One way to calculate the least common multiple is to iterate all the multiples of $m$, until you find one that is also a multiple of $n$. If you already have $gcd$ for [greatest common divisor](<https://rosettacode.org/wiki/greatest common divisor>), then this formula calculates $lcm$.
|
||||
|
||||
$$
|
||||
\\operatorname{lcm}(m, n) = \\frac{|m \\times n|}{\\operatorname{gcd}(m, n)}
|
||||
$$
|
||||
|
||||
# --instructions--
|
||||
|
||||
|
|
Loading…
Reference in New Issue