Files
freeCodeCamp/curriculum/challenges/portuguese/10-coding-interview-prep/project-euler/problem-356-largest-roots-of-cubic-polynomials.md

45 lines
840 B
Markdown
Raw Permalink Normal View History

---
id: 5900f4d01000cf542c50ffe3
title: 'Problema 356: Maiores raízes de polinômios cúbicos'
challengeType: 5
forumTopicId: 302016
dashedName: problem-356-largest-roots-of-cubic-polynomials
---
# --description--
Considere $a_n$ como sendo a maior raiz real de um polinômio $g(x) = x^3 - 2^n \times x^2 + n$.
Por exemplo, $a_2 = 3.86619826\ldots$
Encontre os oito últimos algarismos de $\displaystyle\sum_{i = 1}^{30} \lfloor {a_i}^{987654321}\rfloor$.
**Observação:** $\lfloor a\rfloor$ representa a função piso.
# --hints--
`rootsOfCubicPolynomials()` deve retornar `28010159`.
```js
assert.strictEqual(rootsOfCubicPolynomials(), 28010159);
```
# --seed--
## --seed-contents--
```js
function rootsOfCubicPolynomials() {
return true;
}
rootsOfCubicPolynomials();
```
# --solutions--
```js
// solution required
```