freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-123-prime-square-re...

56 lines
1006 B
Markdown
Raw Normal View History

---
id: 5900f3e71000cf542c50fefa
challengeType: 5
title: 'Problem 123: Prime square remainders'
videoUrl: ''
localeTitle: 问题123素数正方形余数
---
## Description
<section id="description">令pn为第n个素数2,3,5,7,11 ......并且当rpn-1n +pn + 1n除以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>