* 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
1.0 KiB
Markdown
43 lines
1.0 KiB
Markdown
---
|
||
id: 5900f4701000cf542c50ff82
|
||
title: 问题259:可达号码
|
||
challengeType: 5
|
||
videoUrl: ''
|
||
dashedName: problem-259-reachable-numbers
|
||
---
|
||
|
||
# --description--
|
||
|
||
如果正整数可以由遵循以下规则的算术表达式产生,则称为正整数:
|
||
|
||
按顺序使用数字1到9,每个数字恰好一次。可以连接任何连续的数字(例如,使用数字2,3和4,我们获得数字234)。只允许四种常用的二进制算术运算(加法,减法,乘法和除法)。每个操作可以使用任何次数,或者根本不使用。不允许一元减号。可以使用任意数量(可能嵌套的)括号来定义操作的顺序。例如,42是可达的,因为(1/23) *((4* 5)-6)\*(78-9)= 42。
|
||
|
||
所有正可达整数的总和是多少?
|
||
|
||
# --hints--
|
||
|
||
`euler259()`应返回20101196798。
|
||
|
||
```js
|
||
assert.strictEqual(euler259(), 20101196798);
|
||
```
|
||
|
||
# --seed--
|
||
|
||
## --seed-contents--
|
||
|
||
```js
|
||
function euler259() {
|
||
|
||
return true;
|
||
}
|
||
|
||
euler259();
|
||
```
|
||
|
||
# --solutions--
|
||
|
||
```js
|
||
// solution required
|
||
```
|