56 lines
996 B
Markdown
56 lines
996 B
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>
|