Files
freeCodeCamp/curriculum/challenges/japanese/10-coding-interview-prep/project-euler/problem-226-a-scoop-of-blancmange.md
2022-01-20 20:30:18 +01:00

47 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5900f4511000cf542c50ff62
title: '問題 226: 一すくいのブラマンジェ'
challengeType: 5
forumTopicId: 301869
dashedName: problem-226-a-scoop-of-blancmange
---
# --description--
ブラマンジェ曲線は、0x1 かつ $\displaystyle y = \sum_{n = 0}^{\infty} \frac{s(2^nx)}{2^n}$ であるような点 ($x$,$y$) の集合です。ここで、$s(x) は $x$ から最も近い整数への距離を表します。
ブラマンジェ曲線より下の部分 (下図のピンク色の部分) の面積は $\frac{1}{2}$ に等しくなります。
<img class="img-responsive center-block" alt="円 C が示されたブラマンジェ曲線の図" src="https://cdn.freecodecamp.org/curriculum/project-euler/a-scoop-of-blancmange.gif" style="background-color: white; padding: 10px;" />
($\frac{1}{4}$,$\frac{1}{2}$) を円心とする半径 $\frac{1}{4}$ の円 (図の黒い線) を $C$ とします。
$C$ に囲まれ、かつブラマンジェ曲線より下の部分の面積を求めなさい。 回答は、四捨五入して小数第 8 位まで求め、0.abcdefgh の形式にすること。
# --hints--
`scoopOfBlancmange()``0.11316017` を返す必要があります。
```js
assert.strictEqual(scoopOfBlancmange(), 0.11316017);
```
# --seed--
## --seed-contents--
```js
function scoopOfBlancmange() {
return true;
}
scoopOfBlancmange();
```
# --solutions--
```js
// solution required
```