64 lines
1.2 KiB
Markdown
64 lines
1.2 KiB
Markdown
![]() |
---
|
||
|
id: 5
|
||
|
localeTitle: 5900f5071000cf542c510018
|
||
|
challengeType: 5
|
||
|
title: 'Problem 410: Circle and tangent line'
|
||
|
---
|
||
|
|
||
|
## Description
|
||
|
<section id='description'>
|
||
|
Sea C el círculo con el radio r, x2 + y2 = r2. Elegimos dos puntos P (a, b) y Q (-a, c) para que la línea que pasa por P y Q sea tangente a C.
|
||
|
|
||
|
Por ejemplo, el cuadrupleto (r, a, b, c) = ( 2, 6, 2, -7) satisface esta propiedad.
|
||
|
|
||
|
Sea F (R, X) el número de los cuádruples enteros (r, a, b, c) con esta propiedad y con 0 <r ≤ R y 0 <a ≤ X.
|
||
|
|
||
|
Podemos verificar que F (1, 5) = 10, F (2, 10) = 52 y F (10, 100) = 3384.
|
||
|
Encuentre F (108, 109) + F (109, 108).
|
||
|
</section>
|
||
|
|
||
|
## Instructions
|
||
|
<section id='instructions'>
|
||
|
|
||
|
</section>
|
||
|
|
||
|
## Tests
|
||
|
<section id='tests'>
|
||
|
|
||
|
```yml
|
||
|
tests:
|
||
|
- text: <code>euler410()</code> debe devolver 799999783589946600.
|
||
|
testString: 'assert.strictEqual(euler410(), 799999783589946600, "<code>euler410()</code> should return 799999783589946600.");'
|
||
|
|
||
|
```
|
||
|
|
||
|
</section>
|
||
|
|
||
|
## Challenge Seed
|
||
|
<section id='challengeSeed'>
|
||
|
|
||
|
<div id='js-seed'>
|
||
|
|
||
|
```js
|
||
|
function euler410() {
|
||
|
// Good luck!
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
euler410();
|
||
|
```
|
||
|
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
</section>
|
||
|
|
||
|
## Solution
|
||
|
<section id='solution'>
|
||
|
|
||
|
```js
|
||
|
// solution required
|
||
|
```
|
||
|
</section>
|