Files
freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-50-consecutive-prime-sum.chinese.md
Kristofer Koishigawa b3213fc892 fix(i18n): chinese test suite (#38220)
* fix: Chinese test suite

Add localeTiltes, descriptions, and adjust test text and testStrings to get the automated test suite working.

* fix: ran script, updated testStrings and solutions
2020-03-03 18:49:47 +05:30

1.2 KiB
Raw Blame History

id, challengeType, title, videoUrl, localeTitle
id challengeType title videoUrl localeTitle
5900f39e1000cf542c50feb1 5 Problem 50: Consecutive prime sum 问题50连续的总和

Description

素数41可以写成六个连续素数的总和41 = 2 + 3 + 5 + 7 + 11 + 13这是连续素数的最长和它加到低于一百的素数。连续素数低于1000的连续素数加上一个素数包含21个项等于953.哪个素数低于一百万,可以写成最连续素数的总和?

Instructions

Tests

tests:
  - text: <code>consecutivePrimeSum(1000)</code>应该返回953。
    testString: assert.strictEqual(consecutivePrimeSum(1000), 953);
  - text: <code>consecutivePrimeSum(1000000)</code>应该返回997651。
    testString: assert.strictEqual(consecutivePrimeSum(1000000), 997651);

Challenge Seed

function consecutivePrimeSum(limit) {
  // Good luck!
  return true;
}

consecutivePrimeSum(1000000);

Solution

// solution required