* fix: clean-up Project Euler 361-380 * fix: improve wording Co-authored-by: Sem Bauke <46919888+Sembauke@users.noreply.github.com> * fix: remove unnecessary paragraph * fix: corrections from review Co-authored-by: Tom <20648924+moT01@users.noreply.github.com> Co-authored-by: Sem Bauke <46919888+Sembauke@users.noreply.github.com> Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
983 B
983 B
id, title, challengeType, forumTopicId, dashedName
id | title | challengeType | forumTopicId | dashedName |
---|---|---|---|---|
5900f4e41000cf542c50fff5 | Problem 375: Minimum of subsequences | 5 | 302037 | problem-375-minimum-of-subsequences |
--description--
Let S_n
be an integer sequence produced with the following pseudo-random number generator:
$$\begin{align} S_0 & = 290\,797 \\ S_{n + 1} & = {S_n}^2\bmod 50\,515\,093 \end{align}$$
Let A(i, j)
be the minimum of the numbers S_i, S_{i + 1}, \ldots, S_j
for i ≤ j
. Let M(N) = \sum A(i, j)
for 1 ≤ i ≤ j ≤ N
.
We can verify that M(10) = 432\\,256\\,955
and M(10\\,000) = 3\\,264\\,567\\,774\\,119
.
Find M(2\\,000\\,000\\,000)
.
--hints--
minimumOfSubsequences()
should return 7435327983715286000
.
assert.strictEqual(minimumOfSubsequences(), 7435327983715286000);
--seed--
--seed-contents--
function minimumOfSubsequences() {
return true;
}
minimumOfSubsequences();
--solutions--
// solution required