freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-402-integer-valued-...

56 lines
1.3 KiB
Markdown
Raw Normal View History

---
id: 5900f4ff1000cf542c510011
challengeType: 5
title: 'Problem 402: Integer-valued polynomials'
videoUrl: ''
localeTitle: 问题402整数值多项式
---
## Description
<section id="description">可以证明对于每个整数n多项式n4 + 4n3 + 2n2 + 5n是6的倍数。还可以显示6是满足该属性的最大整数。 <p>将Mabc定义为最大m使得n4 + an3 + bn2 + cn是所有整数n的m的倍数。例如M4,2,5= 6。 </p><p>此外将SN定义为所有0 &lt;abc≤N的Mabc之和。 </p><p>我们可以验证S10= 1972和S10000= 2024258331114。 </p><p>设Fk为斐波纳契数列对于k≥2F0 = 0F1 = 1且Fk = Fk-1 + Fk-2。 </p><p>求最高9位数为ΣSFk为2≤k≤1234567890123。 </p></section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler402()</code>应返回356019862。
testString: 'assert.strictEqual(euler402(), 356019862, "<code>euler402()</code> should return 356019862.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler402() {
// Good luck!
return true;
}
euler402();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>