--- id: 5900f3931000cf542c50fea6 challengeType: 5 title: 'Problem 39: Integer right triangles' videoUrl: '' localeTitle: 'Problema 39: triángulos rectos enteros' --- ## 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?
## Instructions
## Tests
```yml tests: - text: intRightTriangles(500) debe devolver 420. testString: 'assert(intRightTriangles(500) == 420, "intRightTriangles(500) should return 420.");' - text: intRightTriangles(800) debe devolver 420. testString: 'assert(intRightTriangles(800) == 420, "intRightTriangles(800) should return 420.");' - text: intRightTriangles(900) debe devolver 840. testString: 'assert(intRightTriangles(900) == 840, "intRightTriangles(900) should return 840.");' - text: intRightTriangles(1000) debe devolver 840. testString: 'assert(intRightTriangles(1000) == 840, "intRightTriangles(1000) should return 840.");' ```
## Challenge Seed
```js function intRightTriangles(n) { // Good luck! return n; } intRightTriangles(1000); ```
## Solution
```js // solution required ```