2018-10-08 13:51:51 -04:00
---
2018-10-10 16:20:40 -04:00
id: 5900f3931000cf542c50fea6
2018-10-08 13:51:51 -04:00
challengeType: 5
title: 'Problem 39: Integer right triangles'
2018-10-10 16:20:40 -04:00
videoUrl: ''
localeTitle: 'Problema 39: triángulos rectos enteros'
2018-10-08 13:51:51 -04:00
---
## Description
2018-10-10 16:20:40 -04:00
<section id="description"> Si p es el perímetro de un triángulo rectángulo con lados de longitud integral, {a, b, c}, hay exactamente tres soluciones para p = 120. {20,48,52}, {24,45,51}, { 30,40,50} ¿Para qué valor de p ≤ n, se maximiza el número de soluciones? </section>
2018-10-08 13:51:51 -04:00
## Instructions
2018-10-10 16:20:40 -04:00
<section id="instructions">
2018-10-08 13:51:51 -04:00
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>intRightTriangles(500)</code> debe devolver 420.
testString: 'assert(intRightTriangles(500) == 420, "<code>intRightTriangles(500)</code> should return 420.");'
- text: <code>intRightTriangles(800)</code> debe devolver 420.
testString: 'assert(intRightTriangles(800) == 420, "<code>intRightTriangles(800)</code> should return 420.");'
- text: <code>intRightTriangles(900)</code> debe devolver 840.
testString: 'assert(intRightTriangles(900) == 840, "<code>intRightTriangles(900)</code> should return 840.");'
- text: <code>intRightTriangles(1000)</code> debe devolver 840.
testString: 'assert(intRightTriangles(1000) == 840, "<code>intRightTriangles(1000)</code> should return 840.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function intRightTriangles(n) {
// Good luck!
return n;
}
intRightTriangles(1000);
2018-10-10 16:20:40 -04:00
2018-10-08 13:51:51 -04:00
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>