2018-10-10 22:03:03 +00:00
|
|
|
|
---
|
|
|
|
|
id: 5900f4881000cf542c50ff9a
|
|
|
|
|
challengeType: 5
|
|
|
|
|
videoUrl: ''
|
2020-10-01 15:54:21 +00:00
|
|
|
|
title: 问题283:面积*周长比为整数的整数边三角形
|
2018-10-10 22:03:03 +00:00
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## Description
|
2020-02-17 16:40:55 +00:00
|
|
|
|
<section id="description">
|
|
|
|
|
考虑具有边6、8和10的三角形。可以看出,周长和面积都等于24。
|
|
|
|
|
因此面积/周长比等于1。
|
|
|
|
|
还要考虑具有边13、14和15的三角形。周长等于42,而面积等于84。
|
|
|
|
|
因此,对于该三角形,面积/周长比等于2。
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
求出面积/周长比等于不超过1000的正整数的所有整数边三角形的周长总和。
|
|
|
|
|
</section>
|
2018-10-10 22:03:03 +00:00
|
|
|
|
|
|
|
|
|
## Instructions
|
2020-02-17 16:40:55 +00:00
|
|
|
|
<section id="instructions">
|
|
|
|
|
</section>
|
2018-10-10 22:03:03 +00:00
|
|
|
|
|
|
|
|
|
## Tests
|
|
|
|
|
<section id='tests'>
|
|
|
|
|
|
|
|
|
|
```yml
|
|
|
|
|
tests:
|
2020-02-17 16:40:55 +00:00
|
|
|
|
- text: <code>euler283()</code>应该返回28038042525570324。
|
|
|
|
|
testString: assert.strictEqual(euler283(), 28038042525570324);
|
2018-10-10 22:03:03 +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
|
|
|
|
|
```
|
2020-08-13 15:24:35 +00:00
|
|
|
|
|
|
|
|
|
/section>
|