freeCodeCamp/curriculum/challenges/portuguese/08-coding-interview-prep/project-euler/problem-342-the-totient-of-...

1.1 KiB
Raw Blame History

id challengeType title videoUrl localeTitle
5900f4c31000cf542c50ffd5 5 Problem 342: The totient of a square is a cube Problema 342: O totiente de um quadrado é um cubo

Description

Considere o número 50. 502 = 2500 = 22 × 54, então φ (2500) = 2 × 4 × 53 = 8 × 53 = 23 × 53. 1 Então, 2500 é um quadrado e φ (2500) é um cubo.

Encontre a soma de todos os números n, 1 <n <1010 de modo que φ (n2) seja um cubo.

1 φ denota a função totiente de Euler.

Instructions

Tests

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

Challenge Seed

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

euler342();

Solution

// solution required