mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-23 22:01:15 -04:00
945 B
945 B
id, title, challengeType, forumTopicId, dashedName
| id | title | challengeType | forumTopicId | dashedName |
|---|---|---|---|---|
| 5900f4c21000cf542c50ffd4 | Problema 340: Funzione Pazza | 5 | 301999 | problem-340-crazy-function |
--description--
Per gli interi fissati a, b, c, definire la funzione pazza F(n) come segue:
\begin{align} & F(n) = n - c \\;\text{ per ogni } n > b \\\\ & F(n) = F(a + F(a + F(a + F(a + n)))) \\;\text{ per ogni } n ≤ b. \end{align}
Inoltre, definisci S(a, b, c) = \displaystyle\sum_{n = 0}^b F(n).
Per esempio, se a = 50, b = 2000 e c = 40, allora F(0) = 3240 e F(2000) = 2040. Inoltre, S(50, 2000, 40) = 5\\,204\\,240.
Trova le ultime 9 cifre di S({21}^7, 7^{21}, {12}^7).
--hints--
crazyFunction() dovrebbe restituire 291504964.
assert.strictEqual(crazyFunction(), 291504964);
--seed--
--seed-contents--
function crazyFunction() {
return true;
}
crazyFunction();
--solutions--
// solution required