Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-190-maximising-a-weighted-product.md
gikf 5a52c229f5 fix(curriculum): clean-up Project Euler 181-200 (#42819)
* fix: clean-up Project Euler 181-200

* fix: corrections from review

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>

* fix: missing delimiter

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
2021-07-15 15:52:14 +02:00

853 B

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5900f42b1000cf542c50ff3d Problem 190: Maximising a weighted product 5 301828 problem-190-maximising-a-weighted-product

--description--

Let S_m = (x_1, x_2, \ldots, x_m) be the $m$-tuple of positive real numbers with x_1 + x_2 + \cdots + x_m = m for which P_m = x_1 \times {x_2}^2 \times \cdots \times {x_m}^m is maximised.

For example, it can be verified that [P_{10}] = 4112 ([ ] is the integer part function).

Find \sum {[P_m]} for 2 ≤ m ≤ 15.

--hints--

maximisingWeightedProduct() should return 371048281.

assert.strictEqual(maximisingWeightedProduct(), 371048281);

--seed--

--seed-contents--

function maximisingWeightedProduct() {

  return true;
}

maximisingWeightedProduct();

--solutions--

// solution required