freeCodeCamp/curriculum/challenges/japanese/10-coding-interview-prep/project-euler/problem-371-licence-plates.md

1.2 KiB

id title challengeType forumTopicId dashedName
5900f4e01000cf542c50fff2 問題 371: ナンバープレート 1 302033 problem-371-licence-plates

--description--

オレゴン州のナンバープレートは、3 つの文字の後に 3 桁の数字が続きます (各桁の数字は [0...9] のいずれか)。

車での通勤中に、セスは次のようなゲームをします。

移動中に見た 2 枚のナンバープレートの数字の合計が 1000 になったら勝ちです。

例: MIC-012 and HAN-988 is a win and RYU-500 and SET-500 too (as long as he sees them in the same trip).

勝つために見る必要のあるナンバープレートの枚数の期待値を求めなさい。 回答は、四捨五入して小数第 8 位まで示すこと。

注: 見たナンバープレートのいずれでも、3 桁の数字が記されている確率は同じと仮定します。

--hints--

licensePlates()40.66368097 を返す必要があります。

assert.strictEqual(licensePlates(), 40.66368097);

--seed--

--seed-contents--

function licensePlates() {

  return true;
}

licensePlates();

--solutions--

// solution required