56 lines
1.1 KiB
Markdown
56 lines
1.1 KiB
Markdown
|
---
|
|||
|
id: 5900f4511000cf542c50ff62
|
|||
|
challengeType: 5
|
|||
|
title: 'Problem 226: A Scoop of Blancmange'
|
|||
|
videoUrl: ''
|
|||
|
localeTitle: 问题226:Blancmange的一个独家新闻
|
|||
|
---
|
|||
|
|
|||
|
## Description
|
|||
|
<section id="description"> blancmange曲线是点(x,y)的集合,使得0≤x≤1,并且其中s(x)=从x到最接近的整数的距离。 <p> blancmange曲线下面积等于½,如下图所示为粉红色。 </p><p>设C为中心(¼,½)和半径¼的圆,在图中以黑色显示。 </p><p> blancmange曲线下面的哪个区域被C包围?将你的答案四舍五入到小数点后八位的形式为0.abcdefgh </p></section>
|
|||
|
|
|||
|
## Instructions
|
|||
|
<section id="instructions">
|
|||
|
</section>
|
|||
|
|
|||
|
## Tests
|
|||
|
<section id='tests'>
|
|||
|
|
|||
|
```yml
|
|||
|
tests:
|
|||
|
- text: <code>euler226()</code>应该返回0.11316017。
|
|||
|
testString: 'assert.strictEqual(euler226(), 0.11316017, "<code>euler226()</code> should return 0.11316017.");'
|
|||
|
|
|||
|
```
|
|||
|
|
|||
|
</section>
|
|||
|
|
|||
|
## Challenge Seed
|
|||
|
<section id='challengeSeed'>
|
|||
|
|
|||
|
<div id='js-seed'>
|
|||
|
|
|||
|
```js
|
|||
|
function euler226() {
|
|||
|
// Good luck!
|
|||
|
return true;
|
|||
|
}
|
|||
|
|
|||
|
euler226();
|
|||
|
|
|||
|
```
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
</section>
|
|||
|
|
|||
|
## Solution
|
|||
|
<section id='solution'>
|
|||
|
|
|||
|
```js
|
|||
|
// solution required
|
|||
|
```
|
|||
|
</section>
|