* 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>
47 lines
900 B
Markdown
47 lines
900 B
Markdown
---
|
||
id: 5900f4c41000cf542c50ffd6
|
||
title: 问题343:分数序列
|
||
challengeType: 5
|
||
videoUrl: ''
|
||
dashedName: problem-343-fractional-sequences
|
||
---
|
||
|
||
# --description--
|
||
|
||
对于任何正整数k,分数xi / yi的有限序列ai由以下定义:a1 = 1 / k且ai =(xi-1 + 1)/(yi-1-1)减少到最低项i> 1 。当ai达到某个整数n时,序列停止。 (即,当yi = 1时。)定义f(k)= n。例如,对于k = 20:
|
||
|
||
1/20→2/19→3/18 = 1/6→2/5→3/4→4/3→5/2→6/1 = 6
|
||
|
||
所以f(20)= 6。
|
||
|
||
对于1≤k≤100,f(1)= 1,f(2)= 2,f(3)= 1且Σf(k3)= 118937。
|
||
|
||
找Σf(k3)为1≤k≤2×106。
|
||
|
||
# --hints--
|
||
|
||
`euler343()`应该返回269533451410884200。
|
||
|
||
```js
|
||
assert.strictEqual(euler343(), 269533451410884200);
|
||
```
|
||
|
||
# --seed--
|
||
|
||
## --seed-contents--
|
||
|
||
```js
|
||
function euler343() {
|
||
|
||
return true;
|
||
}
|
||
|
||
euler343();
|
||
```
|
||
|
||
# --solutions--
|
||
|
||
```js
|
||
// solution required
|
||
```
|