Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-471-triangle-inscribed-in-ellipse.md
Oliver Eyton-Williams ee1e8abd87 feat(curriculum): restore seed + solution to Chinese (#40683)
* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
2021-01-12 19:31:00 -07:00

1.2 KiB

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5900f5431000cf542c510056 Problem 471: Triangle inscribed in ellipse 5 302148 problem-471-triangle-inscribed-in-ellipse

--description--

The triangle ΔABC is inscribed in an ellipse with equation \\frac {x^2} {a^2} + \\frac {y^2} {b^2} = 1, 0 < 2b < a, a and b integers.

Let r(a,b) be the radius of the incircle of ΔABC when the incircle has center (2b, 0) and A has coordinates \\left( \\frac a 2, \\frac {\\sqrt 3} 2 b\\right).

For example, r(3,1) = ½, r(6,2) = 1, r(12,3) = 2.

Let G(n) = \\sum*{a=3}^n \\sum*{b=1}^{\\lfloor \\frac {a - 1} 2 \\rfloor} r(a, b) You are given G(10) = 20.59722222, G(100) = 19223.60980 (rounded to 10 significant digits). Find G(1011). Give your answer in scientific notation rounded to 10 significant digits. Use a lowercase e to separate mantissa and exponent. For G(10) the answer would have been 2.059722222e1.

--hints--

euler471() should return 1.895093981e+31.

assert.strictEqual(euler471(), 1.895093981e31);

--seed--

--seed-contents--

function euler471() {

  return true;
}

euler471();

--solutions--

// solution required