Least common multiple/fi
English · Français · Suomi · Русский
Pienin yhteinen jaettava
Pienin yhteinen jaettava on kahden kokonaisluvun a ja b, pienin positiivinen kokonaisluku, joka on jaollinen sekä a ja b:llä.
Esimerkiksi: Lukujen 12 ja 9 pienin yhteinen jaettava on 36.
Funktio LeastCommonMultiple
function LeastCommonMultiple(a, b: Int64): Int64;
begin
result := b * (a div GreatestCommonDivisor(a, b))
end;Note: Funktio GreatestCommonDivisor täytyy olla määritelty ennen tätä funktiota
Katso myös
From the Free Pascal wiki, page "Least common multiple/fi", as it stood on 2020-02-19 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.
Edited on wiki.freepascal.org by 3 people, 2015–2020
From the official wiki's backup of 26 May 2024: who edited this page there, and when. Edits made there after that date were not recorded, and the earlier versions are not shown here; the main page says why.
| When | Who | What changed |
|---|---|---|
| Djzepi | Created page | |
| FTurtle | ||
| Trev | Fixed syntax highlighting; deleted category included in page template (minor) |
Talk about this page
Nobody has opened a bench for this page yet. Sign in to open one.
