freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-461-almost-pi.chine...

56 lines
1.2 KiB
Markdown
Raw Normal View History

---
id: 5900f53a1000cf542c51004c
challengeType: 5
title: 'Problem 461: Almost Pi'
videoUrl: ''
localeTitle: 问题461几乎是Pi
---
## Description
<section id="description">对于所有非负整数k设fnk= ek / n-1。值得注意的是f2006+ f20075+ f20089+ f200226= 3.141592644529 ...≈π。事实上对于n = 200它是fna+ fnb+ fnc+ fnd形式的π的最佳近似值。设gn= a2 + b2 + c2 + d 2为abcd最小化错误| fna+ fnb+ fnc+ fnd - π| (其中| x |表示x的绝对值。给出g200= 62 + 752 + 892 + 2262 = 64658.求g10000</section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler461()</code>应该返回159820276。
testString: 'assert.strictEqual(euler461(), 159820276, "<code>euler461()</code> should return 159820276.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler461() {
// Good luck!
return true;
}
euler461();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>