62 lines
1.1 KiB
Markdown
62 lines
1.1 KiB
Markdown
|
---
|
||
|
id: 5900f3fd1000cf542c50ff10
|
||
|
challengeType: 5
|
||
|
title: 'Problem 145: How many reversible numbers are there below one-billion?'
|
||
|
forumTopicId: 301774
|
||
|
---
|
||
|
|
||
|
## Description
|
||
|
<section id='description'>
|
||
|
Some positive integers n have the property that the sum [ n + reverse(n) ] consists entirely of odd (decimal) digits. For instance, 36 + 63 = 99 and 409 + 904 = 1313. We will call such numbers reversible; so 36, 63, 409, and 904 are reversible. Leading zeroes are not allowed in either n or reverse(n).
|
||
|
|
||
|
There are 120 reversible numbers below one-thousand.
|
||
|
|
||
|
How many reversible numbers are there below one-billion (109)?
|
||
|
</section>
|
||
|
|
||
|
## Instructions
|
||
|
<section id='instructions'>
|
||
|
|
||
|
</section>
|
||
|
|
||
|
## Tests
|
||
|
<section id='tests'>
|
||
|
|
||
|
```yml
|
||
|
tests:
|
||
|
- text: <code>euler145()</code> should return 608720.
|
||
|
testString: assert.strictEqual(euler145(), 608720);
|
||
|
|
||
|
```
|
||
|
|
||
|
</section>
|
||
|
|
||
|
## Challenge Seed
|
||
|
<section id='challengeSeed'>
|
||
|
|
||
|
<div id='js-seed'>
|
||
|
|
||
|
```js
|
||
|
function euler145() {
|
||
|
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
euler145();
|
||
|
```
|
||
|
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
</section>
|
||
|
|
||
|
## Solution
|
||
|
<section id='solution'>
|
||
|
|
||
|
```js
|
||
|
// solution required
|
||
|
```
|
||
|
|
||
|
</section>
|