freeCodeCamp/curriculum/challenges/english/08-coding-interview-prep/project-euler/problem-207-integer-partiti...

79 lines
1.3 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

---
id: 5900f43c1000cf542c50ff4e
challengeType: 5
title: 'Problem 207: Integer partition equations'
forumTopicId: 301848
---
## Description
<section id='description'>
For some positive integers k, there exists an integer partition of the form   4t = 2t + k,
where 4t, 2t, and k are all positive integers and t is a real number.
The first two such partitions are 41 = 21 + 2 and 41.5849625... = 21.5849625... + 6.
Partitions where t is also an integer are called perfect.
For any m ≥ 1 let P(m) be the proportion of such partitions that are perfect with k ≤ m.
Thus P(6) = 1/2.
In the following table are listed some values of 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
Find the smallest m for which P(m) < 1/12345
</section>
## Instructions
<section id='instructions'>
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler207()</code> should return 44043947822.
testString: assert.strictEqual(euler207(), 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>