freeCodeCamp/curriculum/challenges/english/08-coding-interview-prep/project-euler/problem-190-maximising-a-we...

62 lines
935 B
Markdown
Raw Normal View History

---
id: 5900f42b1000cf542c50ff3d
challengeType: 5
title: 'Problem 190: Maximising a weighted product'
forumTopicId: 301828
---
## Description
<section id='description'>
Let Sm = (x1, x2, ... , xm) be the m-tuple of positive real numbers with x1 + x2 + ... + xm = m for which Pm = x1 * x22 * ... * xmm is maximised.
For example, it can be verified that [P10] = 4112 ([ ] is the integer part function).
Find Σ[Pm] for 2 ≤ m ≤ 15.
</section>
## Instructions
<section id='instructions'>
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler190()</code> should return 371048281.
testString: assert.strictEqual(euler190(), 371048281);
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler190() {
// Good luck!
return true;
}
euler190();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>