Least common multiple: Difference between revisions

Content deleted Content added
Myrmidon (talk | contribs)
→‎{{header|Standard ML}}: add another SML version
Midaz (talk | contribs)
Added Uiua solution
Line 3,204: Line 3,204:
0 OK, 0:330</pre>
0 OK, 0:330</pre>


=={{header|Uiua}}==
<syntaxhighlight lang="uiua">
# Greatest Common Divisor using Euclidean algorithm
Gcd ← ⊙◌⍢(⟜◿:|±,)
# Least Common Multiple
Lcm ← ÷⊃(Gcd|⌵×)
</syntaxhighlight>
=={{header|UNIX Shell}}==
=={{header|UNIX Shell}}==
<math>\operatorname{lcm}(m, n) = \left | \frac{m \times n}{\operatorname{gcd}(m, n)} \right |</math>
<math>\operatorname{lcm}(m, n) = \left | \frac{m \times n}{\operatorname{gcd}(m, n)} \right |</math>