Files
freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-318-2011-nines.md
Oliver Eyton-Williams dec409a4bd fix: s/localeTitle/title/g
2020-10-06 23:10:08 +05:30

84 lines
1.5 KiB
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: 5900f4ab1000cf542c50ffbd
challengeType: 5
videoUrl: ''
title: 问题3182011个九
---
## Description
<section id="description">
考虑实数√2+√3。
当我们计算√2+√3的偶数幂时
我们得到:
√2+√32 = 9.898979485566356 ...
√2+√34 = 97.98979485566356 ...
√2+√36 = 969.998969071069263 ...
√2+√38 = 9601.99989585502907 ...
√2+√310 = 95049.999989479221 ...
√2+√312 = 940897.9999989371855 ...
√2+√314 = 9313929.99999989263 ...
√2+√316 = 92198401.99999998915 ...
这些幂的小数部分开头的连续九个数字似乎没有减少。
实际上可以证明√2+√32n的小数部分对于大n接近1。
考虑形式为√p+√q的所有实数其中p和q为正整数且p <q使得小数部分
(√p+√q的2n对于大n接近1
令Cpqn(√p+√q2n的小数部分开头的连续九个数字
令Npq为n的最小值以使Cpqn)≥2011
求p + q2011的Npq)。
</section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler318()</code>应该返回709313889。
testString: assert.strictEqual(euler318(), 709313889);
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler318() {
// Good luck!
return true;
}
euler318();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
/section>