56 lines
1.2 KiB
Markdown
56 lines
1.2 KiB
Markdown
![]() |
---
|
|||
|
id: 5900f42b1000cf542c50ff3d
|
|||
|
challengeType: 5
|
|||
|
title: 'Problem 190: Maximising a weighted product'
|
|||
|
videoUrl: ''
|
|||
|
localeTitle: 'Проблема 190: Максимизация взвешенного продукта'
|
|||
|
---
|
|||
|
|
|||
|
## Description
|
|||
|
<section id="description"> Пусть Sm = (x1, x2, ..., xm) - m-набор положительных вещественных чисел с x1 + x2 + ... + xm = m, для которого Pm = x1 * x22 * ... * xmm максимизируется , <p> Например, можно проверить, что [P10] = 4112 ([] - функция целочисленной части). </p><p> Найти Σ [Pm] для 2 ≤ m ≤ 15. </p></section>
|
|||
|
|
|||
|
## Instructions
|
|||
|
<section id="instructions">
|
|||
|
</section>
|
|||
|
|
|||
|
## Tests
|
|||
|
<section id='tests'>
|
|||
|
|
|||
|
```yml
|
|||
|
tests:
|
|||
|
- text: <code>euler190()</code> должен возвращать 371048281.
|
|||
|
testString: 'assert.strictEqual(euler190(), 371048281, "<code>euler190()</code> should return 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>
|