官术网_书友最值得收藏!

9. Least common multiples

The least common multiple or LCM of two positive integers A and B, which is written LCM(A, B), is the smallest positive integer that is a multiple of both A and B. For example, LCM(30, 42) is 210 because 210 is the smallest positive integer that is a multiple of 30 (210 = 7 × 30) and 42 (210 = 5 × 42).

Write a program that calculates LCMs. Use the program to verify that LCM(1234567000, 7654321000) = 9,449,772,114,007,000.

主站蜘蛛池模板: 万州区| 尼木县| 河西区| 茂名市| 苗栗县| 高尔夫| 开鲁县| 中宁县| 彩票| 工布江达县| 河西区| 开江县| 高密市| 牙克石市| 临潭县| 焉耆| 焉耆| 富平县| 沂南县| 武清区| 沅江市| 财经| 松滋市| 尼木县| 兴海县| 绥芬河市| 剑川县| 潞城市| 神农架林区| 高淳县| 蒲江县| 通渭县| 霸州市| 尤溪县| 云霄县| 福州市| 横峰县| 建宁县| 壶关县| 平利县| 德庆县|