freeCodeCamp/curriculum/challenges/japanese/10-coding-interview-prep/project-euler/problem-246-tangents-to-an-...

1.9 KiB

id title challengeType forumTopicId dashedName
5900f4621000cf542c50ff75 問題 246: 楕円の接線 1 301893 problem-246-tangents-to-an-ellipse

--description--

ある楕円が次のように定義されています。

中心点 M と半径 r を持つ円 c、および d(G, M) < r となる点 G が与えられるとき、cG から等距離にある点の軌跡が楕円を描きます。

下図は、点が楕円を描く様子を示しています。

楕円の描画アニメーション

M(-2000, 1500)G(8000, 1500) が与えられます。

中心点 M と半径 15\\,000 を持つ円 c も与えられます。

Gc から等距離にある点の軌跡が楕円 e を描きます。

e の外側の点 P から、楕円に対する 2 本の接線 t_1t_2 が描かれます。

t_1t_2 が楕円に接する点を R, S とします。

中心点 M と半径 15000 の円の中で、楕円 e の外側に点 P がある。点 P から楕円まで 2 本の接線 t_1 と t_2 が引かれ、点 R と 点 S で楕円に接している

RPS が 45 度を超えるような格子点 P はいくつありますか。

--hints--

tangentsToAnEllipse()810834388 を返す必要があります。

assert.strictEqual(tangentsToAnEllipse(), 810834388);

--seed--

--seed-contents--

function tangentsToAnEllipse() {

  return true;
}

tangentsToAnEllipse();

--solutions--

// solution required