58 lines
1.2 KiB
Markdown
58 lines
1.2 KiB
Markdown
---
|
||
id: 5900f3e71000cf542c50fefa
|
||
challengeType: 5
|
||
title: 'Problem 123: Prime square remainders'
|
||
forumTopicId: 301750
|
||
localeTitle: 'Задача 123: остатки Prime Square'
|
||
---
|
||
|
||
## Description
|
||
<section id='description'>
|
||
Пусть pn - n-е число простых чисел: 2, 3, 5, 7, 11, ... и r - остаток, когда (pn-1) n + (pn + 1) n делится на pn2. Например, когда n = 3, p3 = 5 и 43 + 63 = 280 ≡ 5 mod 25. Наименьшее значение n, для которого остаток сначала превышает 109, составляет 7037. Найдите наименьшее значение n, для которого остаток сначала превышает 1010.
|
||
</section>
|
||
|
||
## Instructions
|
||
<section id='instructions'>
|
||
|
||
</section>
|
||
|
||
## Tests
|
||
<section id='tests'>
|
||
|
||
```yml
|
||
tests:
|
||
- text: <code>euler123()</code> should return 21035.
|
||
testString: assert.strictEqual(euler123(), 21035);
|
||
|
||
```
|
||
|
||
</section>
|
||
|
||
## Challenge Seed
|
||
<section id='challengeSeed'>
|
||
|
||
<div id='js-seed'>
|
||
|
||
```js
|
||
function euler123() {
|
||
// Good luck!
|
||
return true;
|
||
}
|
||
|
||
euler123();
|
||
|
||
```
|
||
|
||
</div>
|
||
|
||
</section>
|
||
|
||
## Solution
|
||
<section id='solution'>
|
||
|
||
```js
|
||
// solution required
|
||
```
|
||
|
||
</section>
|