freeCodeCamp/curriculum/challenges/portuguese/08-coding-interview-prep/project-euler/problem-377-sum-of-digits-e...

1.2 KiB

id challengeType title videoUrl localeTitle
5900f4e51000cf542c50fff8 5 Problem 377: Sum of digits, experience 13 Problema 377: Soma dos dígitos, experiência 13

Description

Existem 16 inteiros positivos que não têm um zero em seus dígitos e que têm uma soma digital igual a 5, a saber: 5, 14, 23, 32, 41, 113, 122, 131, 212, 221, 311, 1112, 1121, 1211, 2111 e 11111. Sua soma é 17891.

Seja f (n) a soma de todos os inteiros positivos que não tenham zero em seus dígitos e tenham uma soma digital igual a n.

Encontre $ \ displaystyle \ sum_ {i = 1} ^ {17} f (13 ^ i) $. Dê os últimos 9 dígitos como sua resposta.

Instructions

Tests

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

Challenge Seed

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

euler377();

Solution

// solution required