Files
freeCodeCamp/curriculum/challenges/japanese/10-coding-interview-prep/project-euler/problem-354-distances-in-a-bees-honeycomb.md

47 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

---
id: 5900f4cf1000cf542c50ffe1
title: '問題 354: 蜂の巣の中における距離'
challengeType: 5
forumTopicId: 302014
dashedName: problem-354-distances-in-a-bees-honeycomb
---
# --description--
それぞれの部屋が辺長1の完全な正六角形であるような蜂の巣について考えます。
<img class="img-responsive center-block" alt="辺長 1 の六角形の部屋がある蜂の巣" src="https://cdn.freecodecamp.org/curriculum/project-euler/distances-in-a-bees-honeycomb.png" style="background-color: white; padding: 10px;" />
ある特定の部屋は女王蜂が占有しています。 正の実数 $L$ を用いて、女王蜂の部屋から $L$ の距離にある部屋 $B(L)$ を数えます (常に、ある部屋の中心から別の部屋の中心までを測ります)。蜂の巣の大きさは、ここで考えるあらゆる距離に対して十分な大きさであると仮定します。
例: $B(\sqrt{3}) = 6$, $B(\sqrt{21}) = 12$, $B(111\\,111\\,111) = 54$
$B(L) = 450$ となるような $L ≤ 5 \times {10}^{11}$ の数を求めなさい。
# --hints--
`distancesInHoneycomb()``58065134` を返す必要があります。
```js
assert.strictEqual(distancesInHoneycomb(), 58065134);
```
# --seed--
## --seed-contents--
```js
function distancesInHoneycomb() {
return true;
}
distancesInHoneycomb();
```
# --solutions--
```js
// solution required
```