56 lines
1.7 KiB
Markdown
56 lines
1.7 KiB
Markdown
---
|
||
id: 5900f4521000cf542c50ff64
|
||
challengeType: 5
|
||
title: 'Problem 229: Four Representations using Squares'
|
||
videoUrl: ''
|
||
localeTitle: 'Задача 229: Четыре представления с использованием квадратов'
|
||
---
|
||
|
||
## Description
|
||
<section id="description"> Рассмотрим номер 3600. Это очень особенное, потому что <p> 3600 = 482 + 362 3600 = 202 + 2 × 402 3600 = 302 + 3 × 302 3600 = 452 + 7 × 152 </p><p> Аналогично получаем, что 88201 = 992 + 2802 = 2872 + 2 × 542 = 2832 + 3 × 522 = 1972 + 7 × 842. </p><p> В 1747 году Эйлер доказал, какие числа представлены в виде суммы двух квадратов. Нас интересуют числа n, допускающие представления всех следующих четырех типов: </p><p> n = a12 + b12n = a22 + 2 b22n = a32 + 3 b32n = a72 + 7 b72, </p><p> где ak и bk - целые положительные числа. </p><p> Есть 75373 таких чисел, которые не превышают 107. </p><p> Сколько таких чисел не превышает 2 × 109? </p></section>
|
||
|
||
## Instructions
|
||
<section id="instructions">
|
||
</section>
|
||
|
||
## Tests
|
||
<section id='tests'>
|
||
|
||
```yml
|
||
tests:
|
||
- text: <code>euler229()</code> должен вернуть 11325263.
|
||
testString: 'assert.strictEqual(euler229(), 11325263, "<code>euler229()</code> should return 11325263.");'
|
||
|
||
```
|
||
|
||
</section>
|
||
|
||
## Challenge Seed
|
||
<section id='challengeSeed'>
|
||
|
||
<div id='js-seed'>
|
||
|
||
```js
|
||
function euler229() {
|
||
// Good luck!
|
||
return true;
|
||
}
|
||
|
||
euler229();
|
||
|
||
```
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</section>
|
||
|
||
## Solution
|
||
<section id='solution'>
|
||
|
||
```js
|
||
// solution required
|
||
```
|
||
</section>
|