freeCodeCamp/curriculum/challenges/russian/08-coding-interview-prep/project-euler/problem-454-diophantine-rec...

1.1 KiB
Raw Blame History

id challengeType title videoUrl localeTitle
5900f5331000cf542c510045 5 Problem 454: Diophantine reciprocals III Задача 454: диофантовы обратные III

Description

В следующем уравнении x, y и n - целые положительные числа.

1x + 1y = 1n

Для предела L определим F (L) как число решений, удовлетворяющих x <y ≤ L.

Мы можем проверить, что F (15) = 4 и F (1000) = 1069. Найти F (1012).

Instructions

Tests

tests:
  - text: ''
    testString: 'assert.strictEqual(euler454(), 5435004633092, "<code>euler454()</code> should return 5435004633092.");'

Challenge Seed

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

euler454();

Solution

// solution required