56 lines
1.3 KiB
Markdown
56 lines
1.3 KiB
Markdown
---
|
||
id: 5900f3ae1000cf542c50fec1
|
||
challengeType: 5
|
||
title: 'Problem 66: Diophantine equation'
|
||
videoUrl: ''
|
||
localeTitle: 'Problema 66: ecuación diofántica'
|
||
---
|
||
|
||
## Description
|
||
<section id="description"> Considere las ecuaciones diofánticas cuadráticas de la forma: x2 - Dy2 = 1 Por ejemplo, cuando D = 13, la solución mínima en x es 6492 - 13 × 1802 = 1. Se puede suponer que no hay soluciones en enteros positivos cuando D es cuadrado. Al encontrar soluciones mínimas en x para D = {2, 3, 5, 6, 7}, obtenemos lo siguiente: 32 - 2 × 22 = 1 22 - 3 × 12 = 192 - 5 × 42 = 1 52 - 6 × 22 = 1 82 - 7 × 32 = 1 Por lo tanto, al considerar soluciones mínimas en x para D ≤ 7, la mayor x se obtiene cuando D = 5. Encuentre el valor de D ≤ 1000 en soluciones mínimas de x para las cuales se obtiene el mayor valor de x. </section>
|
||
|
||
## Instructions
|
||
<section id="instructions">
|
||
</section>
|
||
|
||
## Tests
|
||
<section id='tests'>
|
||
|
||
```yml
|
||
tests:
|
||
- text: <code>euler66()</code> debe devolver 661.
|
||
testString: 'assert.strictEqual(euler66(), 661, "<code>euler66()</code> should return 661.");'
|
||
|
||
```
|
||
|
||
</section>
|
||
|
||
## Challenge Seed
|
||
<section id='challengeSeed'>
|
||
|
||
<div id='js-seed'>
|
||
|
||
```js
|
||
function euler66() {
|
||
// Good luck!
|
||
return true;
|
||
}
|
||
|
||
euler66();
|
||
|
||
```
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</section>
|
||
|
||
## Solution
|
||
<section id='solution'>
|
||
|
||
```js
|
||
// solution required
|
||
```
|
||
</section>
|