2018-09-30 22:01:58 +00:00
|
|
|
---
|
|
|
|
id: 5900f5271000cf542c510039
|
|
|
|
title: 'Problem 442: Eleven-free integers'
|
2020-11-27 18:02:05 +00:00
|
|
|
challengeType: 5
|
2019-08-05 16:17:33 +00:00
|
|
|
forumTopicId: 302114
|
2021-01-13 02:31:00 +00:00
|
|
|
dashedName: problem-442-eleven-free-integers
|
2018-09-30 22:01:58 +00:00
|
|
|
---
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
# --description--
|
|
|
|
|
2018-09-30 22:01:58 +00:00
|
|
|
An integer is called eleven-free if its decimal expansion does not contain any substring representing a power of 11 except 1.
|
|
|
|
|
|
|
|
For example, 2404 and 13431 are eleven-free, while 911 and 4121331 are not.
|
|
|
|
|
2021-07-30 15:20:31 +00:00
|
|
|
Let $E(n)$ be the $n$th positive eleven-free integer. For example, $E(3) = 3$, $E(200) = 213$ and $E(500\\,000) = 531\\,563$.
|
2018-09-30 22:01:58 +00:00
|
|
|
|
2021-07-30 15:20:31 +00:00
|
|
|
Find $E({10}^{18})$.
|
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-30 15:20:31 +00:00
|
|
|
`elevenFreeIntegers()` should return `1295552661530920200`.
|
2018-09-30 22:01:58 +00:00
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
```js
|
2021-07-30 15:20:31 +00:00
|
|
|
assert.strictEqual(elevenFreeIntegers(), 1295552661530920200);
|
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-30 15:20:31 +00:00
|
|
|
function elevenFreeIntegers() {
|
2020-09-15 16:57:40 +00:00
|
|
|
|
2018-09-30 22:01:58 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2021-07-30 15:20:31 +00:00
|
|
|
elevenFreeIntegers();
|
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
|
|
|
|
```
|