56 lines
1.3 KiB
Markdown
56 lines
1.3 KiB
Markdown
---
|
||
id: 5900f4701000cf542c50ff82
|
||
challengeType: 5
|
||
title: 'Problem 259: Reachable Numbers'
|
||
videoUrl: ''
|
||
localeTitle: 问题259:可达号码
|
||
---
|
||
|
||
## Description
|
||
<section id="description">如果正整数可以由遵循以下规则的算术表达式产生,则称为正整数: <p>按顺序使用数字1到9,每个数字恰好一次。可以连接任何连续的数字(例如,使用数字2,3和4,我们获得数字234)。只允许四种常用的二进制算术运算(加法,减法,乘法和除法)。每个操作可以使用任何次数,或者根本不使用。不允许一元减号。可以使用任意数量(可能嵌套的)括号来定义操作的顺序。例如,42是可达的,因为(1/23) <em>((4</em> 5)-6)*(78-9)= 42。 </p><p>所有正可达整数的总和是多少? </p></section>
|
||
|
||
## Instructions
|
||
<section id="instructions">
|
||
</section>
|
||
|
||
## Tests
|
||
<section id='tests'>
|
||
|
||
```yml
|
||
tests:
|
||
- text: <code>euler259()</code>应返回20101196798。
|
||
testString: 'assert.strictEqual(euler259(), 20101196798, "<code>euler259()</code> should return 20101196798.");'
|
||
|
||
```
|
||
|
||
</section>
|
||
|
||
## Challenge Seed
|
||
<section id='challengeSeed'>
|
||
|
||
<div id='js-seed'>
|
||
|
||
```js
|
||
function euler259() {
|
||
// Good luck!
|
||
return true;
|
||
}
|
||
|
||
euler259();
|
||
|
||
```
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</section>
|
||
|
||
## Solution
|
||
<section id='solution'>
|
||
|
||
```js
|
||
// solution required
|
||
```
|
||
</section>
|