freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-140-modified-fibona...

56 lines
1.3 KiB
Markdown
Raw Normal View History

---
id: 5900f3fa1000cf542c50ff0c
challengeType: 5
title: 'Problem 140: Modified Fibonacci golden nuggets'
videoUrl: ''
localeTitle: 问题140改进的斐波那契金块
---
## Description
<section id="description">考虑无穷多项式系列AGx= xG1 + x2G2 + x3G3 + ...其中Gk是二阶递归关系的第k项Gk = Gk-1 + Gk-2G1 = 1G2 = 4;也就是说1,4,5,9,14,23 ......对于这个问题我们将关注x的值其中AGx是正整数。前五个自然数的x的相应值如下所示。 <p> xAGx√5-1/ 41 2/52√22-2/ 63√137-5/ 144 1/25 </p><p>如果x是理性的我们将称AGx为金块因为它们变得越来越稀少;例如第20个金块是211345365.找到前30个金块的总和。 </p></section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler140()</code>应该返回5673835352990。
testString: 'assert.strictEqual(euler140(), 5673835352990, "<code>euler140()</code> should return 5673835352990.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler140() {
// Good luck!
return true;
}
euler140();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>