freeCodeCamp/curriculum/challenges/japanese/10-coding-interview-prep/project-euler/problem-204-generalised-ham...

1.1 KiB

id title challengeType forumTopicId dashedName
5900f4381000cf542c50ff4b 問題 204: 一般化ハミング数 1 301845 problem-204-generalised-hamming-numbers

--description--

ハミング数とは、いずれの素因数も 5 を超えないような正の数です。

したがって、ハミング数を最小のものからいくつか並べると、1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15 となります。

{10}^8 を超えないハミング数は 1105 個あります。

n を超える素因数を持たない正の数を、n 型の「一般化ハミング数」と呼ぶことにします。 したがって、ハミング数は 5 型の一般化ハミング数です。

{10}^9 を超えない 100 型の一般化ハミング数はいくつありますか。

--hints--

generalisedHammingNumbers()2944730 を返す必要があります。

assert.strictEqual(generalisedHammingNumbers(), 2944730);

--seed--

--seed-contents--

function generalisedHammingNumbers() {

  return true;
}

generalisedHammingNumbers();

--solutions--

// solution required