Files
freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-39-integer-right-triangles.md

40 lines
739 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5900f3931000cf542c50fea6
title: 问题39整数直角三角形
challengeType: 5
videoUrl: ''
---
# --description--
如果p是具有整数长度边的直角三角形的周长{abc}则对于p = 120恰好有三个解。{20,48,52}{24,45,51}{ 30,40,50}对于p≤n的值最大化解的数量是多少
# --hints--
`intRightTriangles(500)`应该返回420。
```js
assert(intRightTriangles(500) == 420);
```
`intRightTriangles(800)`应该返回420。
```js
assert(intRightTriangles(800) == 720);
```
`intRightTriangles(900)`应该返回840。
```js
assert(intRightTriangles(900) == 840);
```
`intRightTriangles(1000)`应该返回840。
```js
assert(intRightTriangles(1000) == 840);
```
# --solutions--