* feat(tools): add seed/solution restore script * chore(curriculum): remove empty sections' markers * chore(curriculum): add seed + solution to Chinese * chore: remove old formatter * fix: update getChallenges parse translated challenges separately, without reference to the source * chore(curriculum): add dashedName to English * chore(curriculum): add dashedName to Chinese * refactor: remove unused challenge property 'name' * fix: relax dashedName requirement * fix: stray tag Remove stray `pre` tag from challenge file. Signed-off-by: nhcarrigan <nhcarrigan@gmail.com> Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
47 lines
1.3 KiB
Markdown
47 lines
1.3 KiB
Markdown
---
|
||
id: 5900f4f41000cf542c510007
|
||
title: 问题392:陷入困境的单位圆
|
||
challengeType: 5
|
||
videoUrl: ''
|
||
dashedName: problem-392-enmeshed-unit-circle
|
||
---
|
||
|
||
# --description--
|
||
|
||
直线网格是正交网格,其中网格线之间的间距不必是等距的。这种网格的一个例子是对数图纸。
|
||
|
||
考虑笛卡尔坐标系中的直线网格,具有以下属性:网格线平行于笛卡尔坐标系的轴。有N + 2个垂直网格线和N + 2个水平网格线。因此存在(N + 1)x(N + 1)个矩形单元。两个外部垂直网格线的方程是x = -1且x = 1.两个外部水平网格线的方程是y = -1和y如果它们与单位圆重叠,则网格单元为红色,否则为黑色。对于这个问题,我们希望您找到剩余的N个内部水平线和N个内部垂直网格线的位置,以便红色占据的区域细胞最小化。
|
||
|
||
例如,这里是N = 10的解决方案的图片:
|
||
|
||
红色单元占N = 10的区域舍入到小数点后面的10位是3.3469640797。
|
||
|
||
找到N = 400的位置。将红色单元占用的区域四舍五入到小数点后面的10位数作为答案。
|
||
|
||
# --hints--
|
||
|
||
`euler392()`应返回3.1486734435。
|
||
|
||
```js
|
||
assert.strictEqual(euler392(), 3.1486734435);
|
||
```
|
||
|
||
# --seed--
|
||
|
||
## --seed-contents--
|
||
|
||
```js
|
||
function euler392() {
|
||
|
||
return true;
|
||
}
|
||
|
||
euler392();
|
||
```
|
||
|
||
# --solutions--
|
||
|
||
```js
|
||
// solution required
|
||
```
|