78 lines
1.4 KiB
Markdown
78 lines
1.4 KiB
Markdown
![]() |
---
|
||
|
id: 5
|
||
|
localeTitle: 5900f43c1000cf542c50ff4e
|
||
|
challengeType: 5
|
||
|
title: 'Problem 207: Integer partition equations'
|
||
|
---
|
||
|
|
||
|
## Description
|
||
|
<section id='description'>
|
||
|
Para algunos enteros positivos k, existe una partición entera de la forma 4t = 2t + k,
|
||
|
donde 4t, 2t y k son todos enteros positivos y t es un número real.
|
||
|
|
||
|
Las dos primeras particiones son 41 = 21 + 2 y 41.5849625 ... = 21.5849625 ... + 6.
|
||
|
|
||
|
particiones donde t también es un número entero se llaman perfectas.
|
||
|
Para cualquier m ≥ 1 sea P (m) la proporción de tales particiones que son perfectas con k ≤ m.
|
||
|
Así, P (6) = 1/2.
|
||
|
|
||
|
En la siguiente tabla se enumeran algunos valores de P (m)
|
||
|
P (5) = 1/1
|
||
|
P (10) = 1/2
|
||
|
P (15) = 2/3
|
||
|
P (20) = 1 / 2
|
||
|
P (25) = 1/2
|
||
|
P (30) = 2/5
|
||
|
...
|
||
|
P (180) = 1/4
|
||
|
P (185) = 3/13
|
||
|
|
||
|
|
||
|
Encuentre la m más pequeña para la cual P (m) <1/12345
|
||
|
</section>
|
||
|
|
||
|
## Instructions
|
||
|
<section id='instructions'>
|
||
|
|
||
|
</section>
|
||
|
|
||
|
## Tests
|
||
|
<section id='tests'>
|
||
|
|
||
|
```yml
|
||
|
tests:
|
||
|
- text: <code>euler207()</code> debe devolver 44043947822.
|
||
|
testString: 'assert.strictEqual(euler207(), 44043947822, "<code>euler207()</code> should return 44043947822.");'
|
||
|
|
||
|
```
|
||
|
|
||
|
</section>
|
||
|
|
||
|
## Challenge Seed
|
||
|
<section id='challengeSeed'>
|
||
|
|
||
|
<div id='js-seed'>
|
||
|
|
||
|
```js
|
||
|
function euler207() {
|
||
|
// Good luck!
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
euler207();
|
||
|
```
|
||
|
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
</section>
|
||
|
|
||
|
## Solution
|
||
|
<section id='solution'>
|
||
|
|
||
|
```js
|
||
|
// solution required
|
||
|
```
|
||
|
</section>
|