freeCodeCamp/curriculum/challenges/portuguese/08-coding-interview-prep/project-euler/problem-164-numbers-for-whi...

1.0 KiB

id challengeType title videoUrl localeTitle
5900f4111000cf542c50ff23 5 Problem 164: Numbers for which no three consecutive digits have a sum greater than a given value Problema 164: Números para os quais não há três dígitos consecutivos com uma soma maior que um determinado valor

Description

Quantos números de 20 dígitos n (sem nenhum zero inicial) existem, de modo que não há três dígitos consecutivos de n que tenham uma soma maior que 9?

Instructions

Tests

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

Challenge Seed

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

euler164();

Solution

// solution required