第 5 题:最小倍数

Problem 5: Smallest Multiple

目录

题目

最小倍数

25202520 是可以被 111010 中的每一个数整除的最小数。

求能被 112020 中的每一个数整除的最小正整数。

Smallest Multiple

25202520 is the smallest number that can be divided by each of the numbers from 11 to 1010 without any remainder.

What is the smallest positive number that is evenly divisible by all of the numbers from 11 to 2020?

解题方法

显然,答案为 112020 中的每一个数进行素因数分解后,取最大的次方并相乘。

112020 分解素因数见下表:

-235711131719
1
21
31
42
51
611
71
83
92
1011
111
1221
131
1411
1511
164
171
1812
191
2021
最高次方 42111111

因此答案为 2432711131719 2^{4} * 3^{2} * 7 * 11 * 13 * 17 * 19

参考代码

1
auto result = 2*2*2*2*3*3*5*7*11*13*17*19;

正确答案

答案
232792560
0%