Files
freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-293-pseudo-fortunate-numbers.md
Oliver Eyton-Williams dec409a4bd fix: s/localeTitle/title/g
2020-10-06 23:10:08 +05:30

70 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5900f4931000cf542c50ffa4
challengeType: 5
videoUrl: ''
title: 问题293伪幸运数
---
## Description
<section id="description">
如果偶数正整数N是2的幂或它的不同质数因子是连续质数则称该数为偶数。
前十二个允许的数字是2,4,6,8,12,16,18,24,30,32,36,48。
如果允许N则最小的整数M> 1使得N + M为质数将被称为N的伪幸运数。
例如N = 630是可接受的因为它是偶数并且其不同的素数因子是连续的素数2,3,5和7。
631之后的下一个质数是641 因此630的伪幸运数为M = 11。
还可以看到16的伪幸运数字是3。
找到所有小于109的允许数字N的所有唯一伪幸运数字之和。
</section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler293()</code>应该返回2209。
testString: assert.strictEqual(euler293(), 2209);
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler293() {
// Good luck!
return true;
}
euler293();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
/section>