mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-08 00:00:41 -04:00
742 B
742 B
id, title, challengeType, forumTopicId, dashedName
| id | title | challengeType | forumTopicId | dashedName |
|---|---|---|---|---|
| 5900f5041000cf542c510016 | Problema 407: Idempotenti | 1 | 302075 | problem-407-idempotents |
--description--
Se calcoliamo a^2\bmod 6 per 0 ≤ a ≤ 5 otteniamo: 0, 1, 4, 3, 4, 1.
Il valore più grande di un tale a^2 ≡ a\bmod 6 è 4.
Chiamiamo M(n) il valore più grande di a < n tale che a^2 ≡ a (\text{mod } n). Quindi M(6) = 4.
Trova \sum M(n) per 1 ≤ n ≤ {10}^7.
--hints--
idempotents() dovrebbe restituire 39782849136421.
assert.strictEqual(idempotents(), 39782849136421);
--seed--
--seed-contents--
function idempotents() {
return true;
}
idempotents();
--solutions--
// solution required