文章目錄

原题链接http://projecteuler.net/problem=47

Distinct primes factors

The first two consecutive numbers to have two distinct prime factors are:

14 = 2 7
15 = 3
5

The first three consecutive numbers to have three distinct prime factors are:
644 = 2² 7 23
645 = 3 5 43
646 = 2 17 19.
Find the first four consecutive integers to have four distinct prime factors. What is the first of these numbers?

不同的素数因子
第一个连续两个数具有两个不同的素数因子的是:
14 = 2 7
15 = 3
5

第一个连续三个数具有三个不同的素数因子的是:
644 = 2² 7 23
645 = 3 5 43
646 = 2 17 19.

请找到第一个连续四个数具有四个不同的素数因子。这些数中的第一个是什么?

解答:
无非就是求素数因子,使用第3题中的方法,得到素数因子,剩下的就是暴力了。

打赏作者

文章目錄