Files
freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-65-convergents-of-e.md
Oliver Eyton-Williams ee1e8abd87 feat(curriculum): restore seed + solution to Chinese (#40683)
* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
2021-01-12 19:31:00 -07:00

1.3 KiB
Raw Blame History

id, title, challengeType, videoUrl, dashedName
id title challengeType videoUrl dashedName
5900f3ad1000cf542c50fec0 问题65e的收敛 5 problem-65-convergents-of-e

--description--

2的平方根可以写成无限连续分数。

√2= 1 + 1

2 + 1

2 + 1

2 + 1

2 + ......

可以写出无限连续分数√2= [1;2]2表示2无限重复。以类似的方式√23= [4;1,3,1,8]。事实证明平方根的连续分数的部分值序列提供了最佳的有理近似。让我们考虑√2的收敛。

1 + 1 = 3/2

2

1 + 1 = 7/5

2 + 1

2

1 + 1 = 17/12

2 + 1

2 + 1

2

1 + 1 = 41/29

2 + 1

2 + 1

2 + 1

2

因此√2的前十个收敛的序列是1,3 / 2,7 / 5,17 / 12,41 / 29,99 / 70,239 / 169,577 / 408,1333 / 985,3333 / 2378 ...最令人惊讶的是重要的数学常数e = [2; 1,2,1,1,4,1,1,6,1......1,2k1......]。 e的会聚序列中的前十个项是2,3,8 / 3,11 / 4,19 / 7,87 / 32,106 / 39,193 / 71,1264 / 465,1457 / 536.... ..第10个收敛的分子中的数字之和为1 + 4 + 5 + 7 = 17。求e的连续分数的第100个收敛的分子中的位数之和。

--hints--

euler65()应该返回272。

assert.strictEqual(euler65(), 272);

--seed--

--seed-contents--

function convergentsOfE() {

  return true;
}

convergentsOfE();

--solutions--

// solution required