* 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>
1.1 KiB
1.1 KiB
id, title, challengeType, forumTopicId, dashedName
id | title | challengeType | forumTopicId | dashedName |
---|---|---|---|---|
5900f4701000cf542c50ff82 | Problem 259: Reachable Numbers | 5 | 301907 | problem-259-reachable-numbers |
--description--
A positive integer will be called reachable if it can result from an arithmetic expression obeying the following rules:
Uses the digits 1 through 9, in that order and exactly once each. Any successive digits can be concatenated (for example, using the digits 2, 3 and 4 we obtain the number 234). Only the four usual binary arithmetic operations (addition, subtraction, multiplication and division) are allowed. Each operation can be used any number of times, or not at all. Unary minus is not allowed. Any number of (possibly nested) parentheses may be used to define the order of operations. For example, 42 is reachable, since (1/23) ((45)-6) * (78-9) = 42.
What is the sum of all positive reachable integers?
--hints--
euler259()
should return 20101196798.
assert.strictEqual(euler259(), 20101196798);
--seed--
--seed-contents--
function euler259() {
return true;
}
euler259();
--solutions--
// solution required