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

1.2 KiB
Raw Blame History

id challengeType title videoUrl localeTitle
5900f5071000cf542c510018 5 Problem 410: Circle and tangent line 问题410圆和切线

Description

设C为半径为r的圆x2 + y2 = r2。我们选择两个点Pab和Q-ac使得穿过P和Q的线与C相切。

例如四元组rabc=2,6,2-7满足该属性。

令FRX为具有该性质的整数四元组rabc的数量并且0 <r≤R且0 <a≤X。

我们可以验证F1,5= 10F2,10= 52和F10,100= 3384.求F108,109+ F109,108

Instructions

Tests

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

Challenge Seed

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

euler410();

Solution

// solution required