freeCodeCamp/curriculum/challenges/portuguese/08-coding-interview-prep/project-euler/problem-108-diophantine-rec...

1.1 KiB

id challengeType title videoUrl localeTitle
5900f3d91000cf542c50feeb 5 Problem 108: Diophantine Reciprocals I Problema 108: Reciprocais Diofantinos I

Description

Na seguinte equação x, y e n são inteiros positivos. 1 / x + 1 / y = 1 / n Para n = 4 existem exatamente três soluções distintas: 1/5 + 1/20 = 1/4
1/6 + 1/12 = 1/4
1/8 + 1/8 = 1/4 Qual é o menor valor de n para o qual o número de soluções distintas excede mil?

Instructions

Tests

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

Challenge Seed

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

diophantineOne();

Solution

// solution required