* 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>
65 lines
836 B
Markdown
65 lines
836 B
Markdown
---
|
||
id: 5900f4491000cf542c50ff5c
|
||
title: 问题221:亚历山大整数
|
||
challengeType: 5
|
||
videoUrl: ''
|
||
dashedName: problem-221-alexandrian-integers
|
||
---
|
||
|
||
# --description--
|
||
|
||
如果存在整数p,q,r,我们将调用正整数A和“亚历山大整数”,这样:
|
||
|
||
```
|
||
A = p · q · r and 1A
|
||
```
|
||
|
||
=
|
||
|
||
```
|
||
1p
|
||
```
|
||
|
||
\+
|
||
|
||
```
|
||
1q
|
||
```
|
||
|
||
\+
|
||
|
||
```
|
||
1r
|
||
```
|
||
|
||
例如,630是亚历山大整数(p = 5,q = -7,r = -18)。实际上,630是第6个亚历山大整数,前6个亚历山大整数是:6,42,120,156,420和630。
|
||
|
||
找到第150000个亚历山大整数。
|
||
|
||
# --hints--
|
||
|
||
`euler221()`应该返回1884161251122450。
|
||
|
||
```js
|
||
assert.strictEqual(euler221(), 1884161251122450);
|
||
```
|
||
|
||
# --seed--
|
||
|
||
## --seed-contents--
|
||
|
||
```js
|
||
function euler221() {
|
||
|
||
return true;
|
||
}
|
||
|
||
euler221();
|
||
```
|
||
|
||
# --solutions--
|
||
|
||
```js
|
||
// solution required
|
||
```
|