Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-184-triangles-containing-the-origin.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.1 KiB

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5900f4241000cf542c50ff37 Problem 184: Triangles containing the origin 5 301820 problem-184-triangles-containing-the-origin

--description--

Consider the set Ir of points (x,y) with integer coordinates in the interior of the circle with radius r, centered at the origin, i.e. x2 + y2 < r2.

For a radius of 2, I2 contains the nine points (0,0), (1,0), (1,1), (0,1), (-1,1), (-1,0), (-1,-1), (0,-1) and (1,-1). There are eight triangles having all three vertices in I2 which contain the origin in the interior. Two of them are shown below, the others are obtained from these by rotation.

For a radius of 3, there are 360 triangles containing the origin in the interior and having all vertices in I3 and for I5 the number is 10600.

How many triangles are there containing the origin in the interior and having all three vertices in I105?

--hints--

euler184() should return 1725323624056.

assert.strictEqual(euler184(), 1725323624056);

--seed--

--seed-contents--

function euler184() {

  return true;
}

euler184();

--solutions--

// solution required