freeCodeCamp/curriculum/challenges/japanese/10-coding-interview-prep/project-euler/problem-173-using-up-to-one...

1.5 KiB

id title challengeType forumTopicId dashedName
5900f41a1000cf542c50ff2c 問題 173: 最大 100 万枚のタイルを使って「穴あき」正方層を何通り作れるか 5 301808 problem-173-using-up-to-one-million-tiles-how-many-different-hollow-square-laminae-can-be-formed

--description--

輪郭が正方形であり、正方形の「穴」があり、上下対称かつ左右対称であるものを「正方層」と呼ぶことにします。 例えば、ちょうど 32 枚の正方形タイルを使用して、下図のような 2 通りの正方層を作ることができます。

それぞれ 2 x 2 と 7 x 7 の穴がある 2 つの正方層

必ずしも一度にすべてのタイルを使用する必要がないとすると、100 枚のタイルで 41 通りの正方層を作成できます。 最大 100 万枚のタイルを使って正方層を何通り作れますか。

--hints--

differentHollowSquareLaminae()1572729 を返す必要があります。

assert.strictEqual(differentHollowSquareLaminae(), 1572729);

--seed--

--seed-contents--

function differentHollowSquareLaminae() {

  return true;
}

differentHollowSquareLaminae();

--solutions--

// solution required