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

22 lines
727 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
id: 5900f53a1000cf542c51004c
title: 问题461几乎是Pi
challengeType: 5
videoUrl: ''
---
# --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);
```
# --solutions--