mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-12 07:02:42 -04:00
45 lines
781 B
Markdown
45 lines
781 B
Markdown
---
|
||
id: 5900f4571000cf542c50ff6a
|
||
title: '问题 235:算术几何序列'
|
||
challengeType: 1
|
||
forumTopicId: 301879
|
||
dashedName: problem-235-an-arithmetic-geometric-sequence
|
||
---
|
||
|
||
# --description--
|
||
|
||
Given is the arithmetic-geometric sequence $u(k) = (900 - 3k)r^{k - 1}$.
|
||
|
||
Let $s(n) = \sum_{k=1 \ldots n} u(k)$.
|
||
|
||
Find the value of $r$ for which $s(5000) = -600\\,000\\,000\\,000$.
|
||
|
||
Give your answer rounded to 12 places behind the decimal point.
|
||
|
||
# --hints--
|
||
|
||
`arithmeticGeometricSequence()` should return `1.002322108633`.
|
||
|
||
```js
|
||
assert.strictEqual(arithmeticGeometricSequence(), 1.002322108633);
|
||
```
|
||
|
||
# --seed--
|
||
|
||
## --seed-contents--
|
||
|
||
```js
|
||
function arithmeticGeometricSequence() {
|
||
|
||
return true;
|
||
}
|
||
|
||
arithmeticGeometricSequence();
|
||
```
|
||
|
||
# --solutions--
|
||
|
||
```js
|
||
// solution required
|
||
```
|