Files
freeCodeCamp/curriculum/challenges/ukrainian/10-coding-interview-prep/project-euler/problem-235-an-arithmetic-geometric-sequence.md

45 lines
945 B
Markdown
Raw Permalink Normal View History

---
id: 5900f4571000cf542c50ff6a
title: 'Завдання 235: Арифметично-геометрична прогресія'
challengeType: 5
forumTopicId: 301879
dashedName: problem-235-an-arithmetic-geometric-sequence
---
# --description--
Дано арифметично-геометричну прогресію $u(k) = (900 - 3k)r^{k - 1}$.
Нехай $s(n) = \sum_{k=1 \ldots n} u(k)$.
Знайдіть значення $r$, при якому $s(5000) = -600\\,000\\,000\\,000\\,000$.
Дайте відповідь, округлену до 12 знаків після коми.
# --hints--
`arithmeticGeometricSequence()` має повернути `1.002322108633`.
```js
assert.strictEqual(arithmeticGeometricSequence(), 1.002322108633);
```
# --seed--
## --seed-contents--
```js
function arithmeticGeometricSequence() {
return true;
}
arithmeticGeometricSequence();
```
# --solutions--
```js
// solution required
```