70 lines
1.0 KiB
Markdown
70 lines
1.0 KiB
Markdown
![]() |
---
|
||
|
id: 5
|
||
|
localeTitle: 5900f4b21000cf542c50ffc5
|
||
|
challengeType: 5
|
||
|
title: 'Problem 326: Modulo Summations'
|
||
|
---
|
||
|
|
||
|
## Description
|
||
|
<section id='description'>
|
||
|
Sea una secuencia recursivamente definida por:.
|
||
|
|
||
|
|
||
|
Así que los primeros 10 elementos de una son: 1,1,0,3,0,3,5,4,1,9.
|
||
|
|
||
|
Sea f (N, M) el número de pares (p, q) tal que:
|
||
|
|
||
|
|
||
|
Se puede ver que f (10,10) = 4 con los pares (3,3), (5, 5), (7,9) y (9,10).
|
||
|
|
||
|
|
||
|
También se le da que f (104,103) = 97158.
|
||
|
|
||
|
Encuentra f (1012,106).
|
||
|
</section>
|
||
|
|
||
|
## Instructions
|
||
|
<section id='instructions'>
|
||
|
|
||
|
</section>
|
||
|
|
||
|
## Tests
|
||
|
<section id='tests'>
|
||
|
|
||
|
```yml
|
||
|
tests:
|
||
|
- text: <code>euler326()</code> debe devolver 1966666166408794400.
|
||
|
testString: 'assert.strictEqual(euler326(), 1966666166408794400, "<code>euler326()</code> should return 1966666166408794400.");'
|
||
|
|
||
|
```
|
||
|
|
||
|
</section>
|
||
|
|
||
|
## Challenge Seed
|
||
|
<section id='challengeSeed'>
|
||
|
|
||
|
<div id='js-seed'>
|
||
|
|
||
|
```js
|
||
|
function euler326() {
|
||
|
// Good luck!
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
euler326();
|
||
|
```
|
||
|
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
</section>
|
||
|
|
||
|
## Solution
|
||
|
<section id='solution'>
|
||
|
|
||
|
```js
|
||
|
// solution required
|
||
|
```
|
||
|
</section>
|