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

43 lines
1.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5900f4da1000cf542c50ffec
title: 'Задача 365: Величезний біноміальний коефіцієнт'
challengeType: 5
forumTopicId: 302026
dashedName: 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`.
```js
assert.strictEqual(hugeBinomialCoefficient(), 162619462356610300);
```
# --seed--
## --seed-contents--
```js
function hugeBinomialCoefficient() {
return true;
}
hugeBinomialCoefficient();
```
# --solutions--
```js
// solution required
```