Files
freeCodeCamp/curriculum/challenges/japanese/10-coding-interview-prep/project-euler/problem-213-flea-circus.md
2022-01-20 20:30:18 +01:00

952 B
Raw Permalink Blame History

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5900f4411000cf542c50ff54 問題 213: ノミのサーカス 5 301855 problem-213-flea-circus

--description--

正方形のマスを並べた 30 × 30 の格子の中に 900 匹のノミがおり、最初は 1 マスにノミが 1 匹ずついます。

ベルが鳴ると、それぞれのノミは隣接するマスに不規則に飛びます (格子の端や角にいるノミを除き、通常は 4 方向のいずれかです)。

ベルが 50 回鳴った後に空になっているマスの数の期待値を求めなさい。 回答は、四捨五入して小数第 6 位まで示すこと。

--hints--

fleaCircus()330.721154 を返す必要があります。

assert.strictEqual(fleaCircus(), 330.721154);

--seed--

--seed-contents--

function fleaCircus() {

  return true;
}

fleaCircus();

--solutions--

// solution required