2018-09-30 22:01:58 +00:00
---
id: 5900f40e1000cf542c50ff21
title: 'Problem 162: Hexadecimal numbers'
2020-11-27 18:02:05 +00:00
challengeType: 5
2019-08-05 16:17:33 +00:00
forumTopicId: 301796
2021-01-13 02:31:00 +00:00
dashedName: problem-162-hexadecimal-numbers
2018-09-30 22:01:58 +00:00
---
2020-11-27 18:02:05 +00:00
# --description--
In the hexadecimal number system numbers are represented using 16 different digits:
2021-07-12 14:19:03 +00:00
$$0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F$$
2020-11-27 18:02:05 +00:00
2021-07-12 14:19:03 +00:00
The hexadecimal number AF when written in the decimal number system equals $10 \times 16 + 15 = 175$.
2020-11-27 18:02:05 +00:00
2018-09-30 22:01:58 +00:00
In the 3-digit hexadecimal numbers 10A, 1A0, A10, and A01 the digits 0,1 and A are all present.
2020-11-27 18:02:05 +00:00
2018-09-30 22:01:58 +00:00
Like numbers written in base ten we write hexadecimal numbers without leading zeroes.
2020-11-27 18:02:05 +00:00
2018-09-30 22:01:58 +00:00
How many hexadecimal numbers containing at most sixteen hexadecimal digits exist with all of the digits 0,1, and A present at least once?
2021-07-12 14:19:03 +00:00
Give your answer with hexadecimal number as a string.
2018-09-30 22:01:58 +00:00
2021-07-12 14:19:03 +00:00
**Note:** (A,B,C,D,E and F in upper case, without any leading or trailing code that marks the number as hexadecimal and without leading zeroes , e.g. 1A3F and not: 1a3f and not 0x1a3f and not $1A3F and not #1A3F and not 0000001A3F)
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-12 14:19:03 +00:00
`hexadecimalNumbers()` should return a string.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
```js
2021-07-12 14:19:03 +00:00
assert(typeof hexadecimalNumbers() === 'string');
```
`hexadecimalNumbers()` should return the string `3D58725572C62302` .
```js
assert.strictEqual(hexadecimalNumbers(), '3D58725572C62302');
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-12 14:19:03 +00:00
function hexadecimalNumbers() {
2020-09-15 16:57:40 +00:00
2018-09-30 22:01:58 +00:00
return true;
}
2021-07-12 14:19:03 +00:00
hexadecimalNumbers();
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
```