freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-199-iterative-circl...

1.2 KiB
Raw Blame History

id challengeType videoUrl title
5900f4341000cf542c50ff46 5 问题199迭代圆包装

Description

三个相等半径的圆放置在较大的圆内,使得每对圆彼此相切并且内圆不重叠。有四个未覆盖的“间隙”,它们将用更多的切圆迭代地填充。

在每次迭代中在每个间隙中放置最大尺寸的圆这为下一次迭代创建了更多的间隙。经过3次迭代如图有108个间隙未被圆圈覆盖的区域部分为0.06790342四舍五入到小数点后8位。

10次迭代后圆圈没有覆盖哪一部分区域使用格式x.xxxxxxxx将您的答案四舍五入到小数点后八位。

Instructions

Tests

tests:
  - text: <code>euler199()</code>应该返回0.00396087。
    testString: assert.strictEqual(euler199(), 0.00396087);

Challenge Seed

function euler199() {
  // Good luck!
  return true;
}

euler199();

Solution

// solution required

/section>