freeCodeCamp/curriculum/challenges/russian/08-coding-interview-prep/project-euler/problem-233-lattice-points-...

1.2 KiB
Raw Blame History

id challengeType title videoUrl localeTitle
5900f4551000cf542c50ff68 5 Problem 233: Lattice points on a circle Задача 233: точки решетки на круге

Description

Пусть f (N) - число точек с целыми координатами, которые находятся на окружности, проходящей через (0,0), (N, 0), (0, N) и (N, N). Можно показать, что f (10000) = 36.

Какова сумма всех натуральных чисел N ≤ 1011 таких, что f (N) = 420?

Instructions

Tests

tests:
  - text: <code>euler233()</code> должен вернуть 271204031455541300.
    testString: 'assert.strictEqual(euler233(), 271204031455541300, "<code>euler233()</code> should return 271204031455541300.");'

Challenge Seed

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

euler233();

Solution

// solution required