Files
freeCodeCamp/curriculum/challenges/ukrainian/10-coding-interview-prep/project-euler/problem-188-the-hyperexponentiation-of-a-number.md

1.1 KiB
Raw Permalink Blame History

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5900f4291000cf542c50ff3b Задача 188: Гіперекспонентація числа 5 301824 problem-188-the-hyperexponentiation-of-a-number

--description--

Гіперекспонентація, або тетрація числа a додатним цілим числом b, яка позначається a↑↑b або {}^ba, рекурсивно визначається так:

a↑↑1 = a,

a↑↑(k+1) = a^{(a↑↑k)}.

Таким чином, маємо, наприклад, 3↑↑2 = 3^3 = 27, отже 3↑↑3 = 3^{27} = 7625597484987 і 3↑↑4 приблизно дорівнюють {10}^{3.6383346400240996 \times {10}^{12}}. Знайдіть останні 8 цифр із 1777↑↑1855.

--hints--

hyperexponentation() має повертати до 95962097.

assert.strictEqual(hyperexponentation(), 95962097);

--seed--

--seed-contents--

function hyperexponentation() {

  return true;
}

hyperexponentation();

--solutions--

// solution required