Files
freeCodeCamp/curriculum/challenges/ukrainian/10-coding-interview-prep/project-euler/problem-365-a-huge-binomial-coefficient.md

1.0 KiB
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} є числом з більш ніж 9 мільярдами (9 × {10}^9) цифр.

Нехай M(n, k, m) позначає біномінальний коефіцієнт \displaystyle\binom{n}{k} модуля m.

Обчисліть \sum M({10}^{18}, {10}^9, p \times q \times r) для 1000 < p < q < r < 5000 та p, q, r — прості числа.

--hints--

hugeBinomialCoefficient() має повернути 162619462356610300.

assert.strictEqual(hugeBinomialCoefficient(), 162619462356610300);

--seed--

--seed-contents--

function hugeBinomialCoefficient() {

  return true;
}

hugeBinomialCoefficient();

--solutions--

// solution required