2018-09-30 22:01:58 +00:00
|
|
|
---
|
|
|
|
id: 5900f4751000cf542c50ff87
|
|
|
|
challengeType: 5
|
|
|
|
title: 'Problem 264: Triangle Centres'
|
|
|
|
---
|
|
|
|
|
|
|
|
## Description
|
|
|
|
<section id='description'>
|
|
|
|
Consider all the triangles having:
|
|
|
|
All their vertices on lattice points.
|
|
|
|
Circumcentre at the origin O.
|
|
|
|
Orthocentre at the point H(5, 0).
|
|
|
|
There are nine such triangles having a perimeter ≤ 50.
|
|
|
|
Listed and shown in ascending order of their perimeter, they are:
|
|
|
|
|
|
|
|
A(-4, 3), B(5, 0), C(4, -3)
|
|
|
|
A(4, 3), B(5, 0), C(-4, -3)
|
|
|
|
A(-3, 4), B(5, 0), C(3, -4)
|
|
|
|
A(3, 4), B(5, 0), C(-3, -4)
|
|
|
|
A(0, 5), B(5, 0), C(0, -5)
|
|
|
|
A(1, 8), B(8, -1), C(-4, -7)
|
|
|
|
A(8, 1), B(1, -8), C(-4, 7)
|
|
|
|
A(2, 9), B(9, -2), C(-6, -7)
|
|
|
|
A(9, 2), B(2, -9), C(-6, 7)
|
|
|
|
|
|
|
|
The sum of their perimeters, rounded to four decimal places, is 291.0089.
|
|
|
|
|
|
|
|
Find all such triangles with a perimeter ≤ 105.
|
|
|
|
Enter as your answer the sum of their perimeters rounded to four decimal places.
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Instructions
|
|
|
|
<section id='instructions'>
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Tests
|
|
|
|
<section id='tests'>
|
|
|
|
|
|
|
|
```yml
|
2018-10-04 13:37:37 +00:00
|
|
|
tests:
|
|
|
|
- text: <code>euler264()</code> should return 2816417.1055.
|
2018-10-08 00:01:53 +00:00
|
|
|
testString: 'assert.strictEqual(euler264(), 2816417.1055, "<code>euler264()</code> should return 2816417.1055.");'
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Challenge Seed
|
|
|
|
<section id='challengeSeed'>
|
|
|
|
|
|
|
|
<div id='js-seed'>
|
|
|
|
|
|
|
|
```js
|
|
|
|
function euler264() {
|
|
|
|
// Good luck!
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
euler264();
|
|
|
|
```
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Solution
|
|
|
|
<section id='solution'>
|
|
|
|
|
|
|
|
```js
|
|
|
|
// solution required
|
|
|
|
```
|
|
|
|
</section>
|