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