Sign in Join
Wiki copytemporary

Least common multiple/ru: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: Least common multiple/ru

OldNewLine
1+Наименьшим общим кратным (**НОК**) двух целых чисел $`a`$ и $`b`$ является наименьшее положительное целое число, которое делится на оба числа $`a`$ и $`b`$.
2+
3+Например: для чисел 12 и 9 наименьшим общим кратным будет число 36.
4+
5+## Функция leastCommonMultiple
6+
7+``` pascal
8+function leastCommonMultiple(a, b: Int64): Int64;
9+begin
10+ result := b * (a div greatestCommonDivisor(a, b));
11+end;
12+```
13+
14+> **Note:** [[Greatest common divisor/ru|Функция greatestCommonDivisor]] должна быть объявлена перед функцией leastCommonMultiple.
15+
16+## См. также
17+
18+- [[Greatest common divisor/ru|Наибольший общий делитель]]
19+- mpz_lcm в [[gmp|GMP]] (библиотека высокой точности GNU)
20+
21+---
22+*From the Free Pascal wiki, page "Least common multiple/ru", as it stood on 2018-02-13 after a change by Useroflazarus, 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](/wiki-contact).*
23+Category: Mathematics/ru

Back to history