freeCodeCamp/curriculum/challenges/russian/08-coding-interview-prep/project-euler/problem-410-circle-and-tang...

1.3 KiB
Raw Blame History

id challengeType title videoUrl localeTitle
5900f5071000cf542c510018 5 Problem 410: Circle and tangent line

Description

Пусть C - окружность с радиусом r, x2 + y2 = r2. Выберем две точки P (a, b) и Q (-a, c) так, чтобы прямая, проходящая через P и Q, касалась C.

Например, квадруполь (r, a, b, c) = (2, 6, 2, -7) удовлетворяет этому свойству.

Пусть F (R, X) - число целых квадруплетов (r, a, b, c) с этим свойством и с 0 <r ≤ R и 0 <a ≤ X.

Мы можем проверить, что F (1, 5) = 10, F (2, 10) = 52 и F (10, 100) = 3384. Найти F (108, 109) + F (109, 108).

Instructions

undefined

Tests

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

Challenge Seed

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

euler410();

Solution

// solution required