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

39 lines
890 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
id: 5900f53a1000cf542c51004c
title: 问题461几乎是Pi
challengeType: 5
videoUrl: ''
dashedName: problem-461-almost-pi
---
# --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
# --hints--
`euler461()`应该返回159820276。
```js
assert.strictEqual(euler461(), 159820276);
```
# --seed--
## --seed-contents--
```js
function euler461() {
return true;
}
euler461();
```
# --solutions--
```js
// solution required
```