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.3 KiB
Raw Blame History

id, title, isRequired, challengeType, videoUrl, localeTitle
id title isRequired challengeType videoUrl localeTitle
a3bfc1673c0526e06d3ac698 Sum All Primes true 5 Sum All Primes

Description

将所有素数加起来并包括所提供的数字。素数被定义为大于1的数并且只有两个除数一个和一个除数。例如2是素数因为它只能被1和2整除。提供的号码可能不是主要的。如果卡住请记得使用Read-Search-Ask 。尝试配对程序。编写自己的代码。

Instructions

Tests

tests:
  - text: <code>sumPrimes(10)</code>应该返回一个数字。
    testString: assert.deepEqual(typeof sumPrimes(10), 'number');
  - text: <code>sumPrimes(10)</code>应该返回17。
    testString: assert.deepEqual(sumPrimes(10), 17);
  - text: <code>sumPrimes(977)</code>应该返回73156。
    testString: assert.deepEqual(sumPrimes(977), 73156);

Challenge Seed

function sumPrimes(num) {
  return num;
}

sumPrimes(10);

Solution

// solution required

/section>