Files
freeCodeCamp/curriculum/challenges/japanese/10-coding-interview-prep/project-euler/problem-365-a-huge-binomial-coefficient.md
2022-01-23 00:08:20 +09:00

896 B
Raw Permalink Blame History

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5900f4da1000cf542c50ffec 問題 365: 巨大な二項係数 5 302026 problem-365-a-huge-binomial-coefficient

--description--

二項係数 \displaystyle\binom{{10}^{18}}{{10}^9} は 90 億 (9 × {10}^9) 桁を超える数です。

M(n, k, m) を、二項係数 \displaystyle\binom{n}{k} mod m とします。

素数 p, q, r1000 < p < q < r < 5000 を満たすとき、\sum M({10}^{18}, {10}^9, p \times q \times r) を求めなさい。

--hints--

hugeBinomialCoefficient()162619462356610300 を返す必要があります。

assert.strictEqual(hugeBinomialCoefficient(), 162619462356610300);

--seed--

--seed-contents--

function hugeBinomialCoefficient() {

  return true;
}

hugeBinomialCoefficient();

--solutions--

// solution required