Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-190-maximising-a-weighted-product.english.md
mrugesh 22afc2a0ca feat(learn): python certification projects (#38216)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Kristofer Koishigawa <scissorsneedfoodtoo@gmail.com>
Co-authored-by: Beau Carnes <beaucarnes@gmail.com>
2020-05-27 13:19:08 +05:30

951 B

id, challengeType, isHidden, title, forumTopicId
id challengeType isHidden title forumTopicId
5900f42b1000cf542c50ff3d 5 false Problem 190: Maximising a weighted product 301828

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.

Instructions

Tests

tests:
  - text: <code>euler190()</code> should return 371048281.
    testString: assert.strictEqual(euler190(), 371048281);

Challenge Seed

function euler190() {
  // Good luck!
  return true;
}

euler190();

Solution

// solution required