* feat(tools): add seed/solution restore script * chore(curriculum): remove empty sections' markers * chore(curriculum): add seed + solution to Chinese * chore: remove old formatter * fix: update getChallenges parse translated challenges separately, without reference to the source * chore(curriculum): add dashedName to English * chore(curriculum): add dashedName to Chinese * refactor: remove unused challenge property 'name' * fix: relax dashedName requirement * fix: stray tag Remove stray `pre` tag from challenge file. Signed-off-by: nhcarrigan <nhcarrigan@gmail.com> Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
43 lines
881 B
Markdown
43 lines
881 B
Markdown
---
|
||
id: 5900f5311000cf542c510042
|
||
title: 问题451:模逆
|
||
challengeType: 5
|
||
videoUrl: ''
|
||
dashedName: problem-451-modular-inverses
|
||
---
|
||
|
||
# --description--
|
||
|
||
考虑数字15.有八个正数小于15,它们与15:1,2,4,7,8,11,13,14相互作用。这些数模15的模数逆是:1,8,4 ,13,2,11,7,14因为1 \* 1 mod 15 = 1 2 \* 8 = 16 mod 15 = 1 4 \* 4 = 16 mod 15 = 1 7 \* 13 = 91 mod 15 = 1 11 \* 11 = 121 mod 15 = 1 14 \* 14 = 196 mod 15 = 1
|
||
|
||
设I(n)是小于n-1的最大正数m,使得m modulo n的模逆与m本身相等。所以我(15)= 11。我(100)= 51和I(7)= 1。
|
||
|
||
求3Σn≤2·107的ΣI(n)
|
||
|
||
# --hints--
|
||
|
||
`euler451()`应该返回153651073760956。
|
||
|
||
```js
|
||
assert.strictEqual(euler451(), 153651073760956);
|
||
```
|
||
|
||
# --seed--
|
||
|
||
## --seed-contents--
|
||
|
||
```js
|
||
function euler451() {
|
||
|
||
return true;
|
||
}
|
||
|
||
euler451();
|
||
```
|
||
|
||
# --solutions--
|
||
|
||
```js
|
||
// solution required
|
||
```
|