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

62 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
id: 5900f3931000cf542c50fea6
challengeType: 5
videoUrl: ''
localeTitle: 问题39整数直角三角形
---
## Description
<section id="description">如果p是具有整数长度边的直角三角形的周长{abc}则对于p = 120恰好有三个解。{20,48,52}{24,45,51}{ 30,40,50}对于p≤n的值最大化解的数量是多少 </section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>intRightTriangles(500)</code>应该返回420。
testString: assert(intRightTriangles(500) == 420);
- text: <code>intRightTriangles(800)</code>应该返回420。
testString: assert(intRightTriangles(800) == 720);
- text: <code>intRightTriangles(900)</code>应该返回840。
testString: assert(intRightTriangles(900) == 840);
- text: <code>intRightTriangles(1000)</code>应该返回840。
testString: assert(intRightTriangles(1000) == 840);
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function intRightTriangles(n) {
// Good luck!
return n;
}
intRightTriangles(1000);
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
/section>