72 lines
1.1 KiB
Markdown
72 lines
1.1 KiB
Markdown
---
|
||
id: 5900f4a31000cf542c50ffb6
|
||
challengeType: 5
|
||
videoUrl: ''
|
||
title: 问题311:双斜积分四边形
|
||
---
|
||
|
||
## Description
|
||
<section id="description">
|
||
ABCD是凸的整数边四边形,其1≤AB <BC <CD <AD。
|
||
BD具有整数长度。 O是BD的中点。 AO,您有整数长度。
|
||
如果AO = CO≤BO = DO,我们将ABCD称为双斜积分四边形。
|
||
|
||
例如,以下四边形是双斜积分四边形:
|
||
AB = 19,BC = 29,CD = 37,AD = 43,BD = 48和AO = CO = 23。
|
||
|
||
|
||
|
||
|
||
令B(N)为满足AB2 + BC2 + CD2 + AD2≤N的不同双斜积分四边形ABCD的数量。
|
||
我们可以验证B(10000)= 49和B(1 000 000)= 38239。
|
||
|
||
|
||
求B(10000000000000)。
|
||
</section>
|
||
|
||
## Instructions
|
||
<section id="instructions">
|
||
</section>
|
||
|
||
## Tests
|
||
<section id='tests'>
|
||
|
||
```yml
|
||
tests:
|
||
- text: <code>euler311()</code>应该返回2466018557。
|
||
testString: assert.strictEqual(euler311(), 2466018557);
|
||
|
||
```
|
||
|
||
</section>
|
||
|
||
## Challenge Seed
|
||
<section id='challengeSeed'>
|
||
|
||
<div id='js-seed'>
|
||
|
||
```js
|
||
function euler311() {
|
||
// Good luck!
|
||
return true;
|
||
}
|
||
|
||
euler311();
|
||
|
||
```
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</section>
|
||
|
||
## Solution
|
||
<section id='solution'>
|
||
|
||
```js
|
||
// solution required
|
||
```
|
||
|
||
/section>
|