56 lines
1006 B
Markdown
56 lines
1006 B
Markdown
|
---
|
|||
|
id: 5900f3e71000cf542c50fefa
|
|||
|
challengeType: 5
|
|||
|
title: 'Problem 123: Prime square remainders'
|
|||
|
videoUrl: ''
|
|||
|
localeTitle: 问题123:素数正方形余数
|
|||
|
---
|
|||
|
|
|||
|
## Description
|
|||
|
<section id="description">令pn为第n个素数:2,3,5,7,11 ......,并且当r(pn-1)n +(pn + 1)n除以pn2时,令r为余数。例如,当n = 3时,p3 = 5,并且43 + 63 =280≡5mod 25.余数首先超过109的n的最小值是7037.求出余数首次超过的n的最小值1010。 </section>
|
|||
|
|
|||
|
## Instructions
|
|||
|
<section id="instructions">
|
|||
|
</section>
|
|||
|
|
|||
|
## Tests
|
|||
|
<section id='tests'>
|
|||
|
|
|||
|
```yml
|
|||
|
tests:
|
|||
|
- text: <code>euler123()</code>应该返回21035。
|
|||
|
testString: 'assert.strictEqual(euler123(), 21035, "<code>euler123()</code> should return 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>
|