56 lines
1.3 KiB
Markdown
56 lines
1.3 KiB
Markdown
|
---
|
|||
|
id: 5900f52d1000cf542c510040
|
|||
|
challengeType: 5
|
|||
|
title: 'Problem 449: Chocolate covered candy'
|
|||
|
videoUrl: ''
|
|||
|
localeTitle: 问题449:巧克力糖果
|
|||
|
---
|
|||
|
|
|||
|
## Description
|
|||
|
<section id="description">菲尔糖果制造商正在制作一批新的巧克力糖果。每个糖果中心的形状类似于由以下等式定义的旋转椭圆体:b2x2 + b2y2 + a2z2 = a2b2。 <p>菲尔想知道需要多少巧克力来覆盖一个糖果中心,用一层厚厚的巧克力涂层。如果a = 1 mm且b = 1 mm,则所需的巧克力量为</p><pre> <code>283 π mm3</code> </pre><p>如果a = 2 mm且b = 1 mm,则所需的巧克力量约为60.35475635 mm3。 </p><p>如果a = 3 mm且b = 1 mm,则找出所需的mm3巧克力量。将数字舍入到小数点后面的小数点后8位。 </p></section>
|
|||
|
|
|||
|
## Instructions
|
|||
|
<section id="instructions">
|
|||
|
</section>
|
|||
|
|
|||
|
## Tests
|
|||
|
<section id='tests'>
|
|||
|
|
|||
|
```yml
|
|||
|
tests:
|
|||
|
- text: <code>euler449()</code>应返回103.37870096。
|
|||
|
testString: 'assert.strictEqual(euler449(), 103.37870096, "<code>euler449()</code> should return 103.37870096.");'
|
|||
|
|
|||
|
```
|
|||
|
|
|||
|
</section>
|
|||
|
|
|||
|
## Challenge Seed
|
|||
|
<section id='challengeSeed'>
|
|||
|
|
|||
|
<div id='js-seed'>
|
|||
|
|
|||
|
```js
|
|||
|
function euler449() {
|
|||
|
// Good luck!
|
|||
|
return true;
|
|||
|
}
|
|||
|
|
|||
|
euler449();
|
|||
|
|
|||
|
```
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
</section>
|
|||
|
|
|||
|
## Solution
|
|||
|
<section id='solution'>
|
|||
|
|
|||
|
```js
|
|||
|
// solution required
|
|||
|
```
|
|||
|
</section>
|