2018-09-30 22:01:58 +00:00
|
|
|
---
|
|
|
|
id: 5900f4881000cf542c50ff9a
|
|
|
|
challengeType: 5
|
|
|
|
title: 'Problem 283: Integer sided triangles for which the area * perimeter ratio is integral'
|
|
|
|
---
|
|
|
|
|
|
|
|
## Description
|
|
|
|
<section id='description'>
|
2018-10-08 00:01:53 +00:00
|
|
|
Consider the triangle with sides 6, 8 and 10. It can be seen that the perimeter and the area are both equal to 24.
|
2018-09-30 22:01:58 +00:00
|
|
|
So the area/perimeter ratio is equal to 1.
|
2018-10-08 00:01:53 +00:00
|
|
|
Consider also the triangle with sides 13, 14 and 15. The perimeter equals 42 while the area is equal to 84.
|
2018-09-30 22:01:58 +00:00
|
|
|
So for this triangle the area/perimeter ratio is equal to 2.
|
|
|
|
|
|
|
|
|
|
|
|
Find the sum of the perimeters of all integer sided triangles for which the area/perimeter ratios are equal to positive integers not exceeding 1000.
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Instructions
|
|
|
|
<section id='instructions'>
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Tests
|
|
|
|
<section id='tests'>
|
|
|
|
|
|
|
|
```yml
|
2018-10-04 13:37:37 +00:00
|
|
|
tests:
|
|
|
|
- text: <code>euler283()</code> should return 28038042525570324.
|
2018-10-20 18:02:47 +00:00
|
|
|
testString: assert.strictEqual(euler283(), 28038042525570324, '<code>euler283()</code> should return 28038042525570324.');
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Challenge Seed
|
|
|
|
<section id='challengeSeed'>
|
|
|
|
|
|
|
|
<div id='js-seed'>
|
|
|
|
|
|
|
|
```js
|
|
|
|
function euler283() {
|
|
|
|
// Good luck!
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
euler283();
|
|
|
|
```
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Solution
|
|
|
|
<section id='solution'>
|
|
|
|
|
|
|
|
```js
|
|
|
|
// solution required
|
|
|
|
```
|
|
|
|
</section>
|