Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-356-largest-roots-of-cubic-polynomials.md
gikf c18554dd44 fix(curriculum): clean-up Project Euler 341-360 (#42998)
* fix: clean-up Project Euler 341-360

* fix: improve wording

Co-authored-by: Sem Bauke <46919888+Sembauke@users.noreply.github.com>

* fix: corrections from review

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>

Co-authored-by: Sem Bauke <46919888+Sembauke@users.noreply.github.com>
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
2021-07-29 19:14:22 +02:00

45 lines
805 B
Markdown

---
id: 5900f4d01000cf542c50ffe3
title: 'Problem 356: Largest roots of cubic polynomials'
challengeType: 5
forumTopicId: 302016
dashedName: problem-356-largest-roots-of-cubic-polynomials
---
# --description--
Let an be the largest real root of a polynomial $g(x) = x^3 - 2^n \times x^2 + n$.
For example, $a_2 = 3.86619826\ldots$
Find the last eight digits of $\displaystyle\sum_{i = 1}^{30} \lfloor {a_i}^{987654321}\rfloor$.
**Note:** $\lfloor a\rfloor$ represents the floor function.
# --hints--
`rootsOfCubicPolynomials()` should return `28010159`.
```js
assert.strictEqual(rootsOfCubicPolynomials(), 28010159);
```
# --seed--
## --seed-contents--
```js
function rootsOfCubicPolynomials() {
return true;
}
rootsOfCubicPolynomials();
```
# --solutions--
```js
// solution required
```