Files
freeCodeCamp/curriculum/challenges/portuguese/10-coding-interview-prep/project-euler/problem-190-maximising-a-weighted-product.md

43 lines
880 B
Markdown
Raw Permalink Normal View History

---
id: 5900f42b1000cf542c50ff3d
title: 'Problema 190: Maximização de um produto ponderado'
challengeType: 5
forumTopicId: 301828
dashedName: problem-190-maximising-a-weighted-product
---
# --description--
Considere $S_m = (x_1, x_2, \ldots, x_m)$ a $m$-ésima tupla de números reais positivos com $x_1 + x_2 + \cdots + x_m = m$ para a qual $P_m = x_1 \times {x_2}^2 \times \cdots \times {x_m}^m$ é maximizado.
Por exemplo, pode-se verificar que $[P_{10}] = 4112$ ([ ] é a parte inteira da função).
Encontre $\sum {[P_m]}$ para $2 ≤ m ≤ 15$.
# --hints--
`maximisingWeightedProduct()` deve retornar `371048281`.
```js
assert.strictEqual(maximisingWeightedProduct(), 371048281);
```
# --seed--
## --seed-contents--
```js
function maximisingWeightedProduct() {
return true;
}
maximisingWeightedProduct();
```
# --solutions--
```js
// solution required
```