2018-09-30 22:01:58 +00:00
---
id: 5900f3fd1000cf542c50ff10
title: 'Problem 145: How many reversible numbers are there below one-billion?'
2020-11-27 18:02:05 +00:00
challengeType: 5
2019-08-05 16:17:33 +00:00
forumTopicId: 301774
2021-01-13 02:31:00 +00:00
dashedName: problem-145-how-many-reversible-numbers-are-there-below-one-billion
2018-09-30 22:01:58 +00:00
---
2020-11-27 18:02:05 +00:00
# --description--
2021-07-14 11:05:12 +00:00
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)$.
2018-09-30 22:01:58 +00:00
There are 120 reversible numbers below one-thousand.
2021-07-14 11:05:12 +00:00
How many reversible numbers are there below one-billion (${10}^9$)?
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
# --hints--
2018-09-30 22:01:58 +00:00
2021-07-14 11:05:12 +00:00
`reversibleNumbers()` should return `608720` .
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
```js
2021-07-14 11:05:12 +00:00
assert.strictEqual(reversibleNumbers(), 608720);
2018-09-30 22:01:58 +00:00
```
2020-11-27 18:02:05 +00:00
# --seed--
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
## --seed-contents--
2018-09-30 22:01:58 +00:00
```js
2021-07-14 11:05:12 +00:00
function reversibleNumbers() {
2020-09-15 16:57:40 +00:00
2018-09-30 22:01:58 +00:00
return true;
}
2021-07-14 11:05:12 +00:00
reversibleNumbers();
2018-09-30 22:01:58 +00:00
```
2020-11-27 18:02:05 +00:00
# --solutions--
2018-09-30 22:01:58 +00:00
```js
// solution required
```