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

43 lines
901 B
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: 'Problema 365: Um coeficiente binomial enorme'
challengeType: 5
forumTopicId: 302026
dashedName: problem-365-a-huge-binomial-coefficient
---
# --description--
O coeficiente binomial $\displaystyle\binom{{10}^{18}}{{10}^9}$ é um número com mais de 9 bilhões de algarismos ($9 × {10}^9$).
Considere $M(n, k, m)$ como o coeficiente binomial $\displaystyle\binom{n}{k}$ modulo $m$.
Calcule $\sum M({10}^{18}, {10}^9, p \times q \times r)$ para$1000 < p < q < r < 5000$ e com $p$, $q$, $r$ sendo números primos.
# --hints--
`hugeBinomialCoefficient()` deve retornar `162619462356610300`.
```js
assert.strictEqual(hugeBinomialCoefficient(), 162619462356610300);
```
# --seed--
## --seed-contents--
```js
function hugeBinomialCoefficient() {
return true;
}
hugeBinomialCoefficient();
```
# --solutions--
```js
// solution required
```