freeCodeCamp/curriculum/challenges/portuguese/08-coding-interview-prep/project-euler/problem-442-eleven-free-int...

1.1 KiB

id challengeType title videoUrl localeTitle
5900f5271000cf542c510039 5 Problem 442: Eleven-free integers Problema 442: Inteiros sem onze

Description

Um inteiro é chamado onze-free se sua expansão decimal não contiver qualquer substring representando uma potência de 11, exceto 1.

Por exemplo, 2404 e 13431 são onze livres, enquanto 911 e 4121331 não são.

Seja E (n) o n-ésimo inteiro sem onze positivo. Por exemplo, E (3) = 3, E (200) = 213 e E (500 000) = 531563.

Encontre E (1018).

Instructions

Tests

tests:
  - text: <code>euler442()</code> deve retornar 1295552661530920200.
    testString: 'assert.strictEqual(euler442(), 1295552661530920200, "<code>euler442()</code> should return 1295552661530920200.");'

Challenge Seed

function euler442() {
  // Good luck!
  return true;
}

euler442();

Solution

// solution required