Files
freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-47-distinct-primes-factors.chinese.md
Oliver Eyton-Williams 61460c8601 fix: insert blank line after ```
search and replace ```\n< with ```\n\n< to ensure there's an empty line
before closing tags
2020-08-16 04:45:20 +05:30

1.5 KiB
Raw Blame History

id, challengeType, title, videoUrl, localeTitle
id challengeType title videoUrl localeTitle
5900f39c1000cf542c50feae 5 Problem 47: Distinct primes factors 问题47不同的素数因素

Description

前两个连续数字有两个不同的素数因子是:
14 = 2×7
15 = 3×5
前三个连续数字有三个不同的素因子:
644 =2²×7×23
645 = 3×5×43
646 = 2×17×19
找到前四个连续的整数,每个整数有四个不同的素数因子。这些数字中的第一个是什么?

Instructions

Tests

tests:
  - text: '<code>distinctPrimeFactors(2, 2)</code>应该返回14。'
    testString: assert.strictEqual(distinctPrimeFactors(2, 2), 14);
  - text: '<code>distinctPrimeFactors(3, 3)</code>应该返回644。'
    testString: assert.strictEqual(distinctPrimeFactors(3, 3), 644);
  - text: '<code>distinctPrimeFactors(4, 4)</code>应该返回134043。'
    testString: assert.strictEqual(distinctPrimeFactors(4, 4), 134043);

Challenge Seed

function distinctPrimeFactors(targetNumPrimes, targetConsecutive) {
  // Good luck!
  return true;
}

distinctPrimeFactors(4, 4);

Solution

// solution required

/section>