Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-390-triangles-with-non-rational-sides-and-integral-area.english.md
mrugesh 22afc2a0ca feat(learn): python certification projects (#38216)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Kristofer Koishigawa <scissorsneedfoodtoo@gmail.com>
Co-authored-by: Beau Carnes <beaucarnes@gmail.com>
2020-05-27 13:19:08 +05:30

1.0 KiB

id, challengeType, isHidden, title, forumTopicId
id challengeType isHidden title forumTopicId
5900f4f21000cf542c510005 5 false Problem 390: Triangles with non rational sides and integral area 302055

Description

Consider the triangle with sides √5, √65 and √68. It can be shown that this triangle has area 9.

S(n) is the sum of the areas of all triangles with sides √(1+b2), √(1+c2) and √(b2+c2) (for positive integers b and c ) that have an integral area not exceeding n.

The example triangle has b=2 and c=8.

S(106)=18018206.

Find S(1010).

Instructions

Tests

tests:
  - text: <code>euler390()</code> should return 2919133642971.
    testString: assert.strictEqual(euler390(), 2919133642971);

Challenge Seed

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

euler390();

Solution

// solution required