freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-183-maximum-product...

56 lines
1.6 KiB
Markdown
Raw Normal View History

---
id: 5900f4231000cf542c50ff36
challengeType: 5
title: 'Problem 183: Maximum product of parts'
videoUrl: ''
localeTitle: 问题183零件的最大产品
---
## Description
<section id="description">令N为正整数并且将N分成k个相等的部分r = N / k使得N = r + r + ... + r。设P是这些部分的乘积P = r×r×...×r = rk。 <p>例如如果11被分成五个相等的部分11 = 2.2 + 2.2 + 2.2 + 2.2 + 2.2那么P = 2.25 = 51.53632。 </p><p>对于给定的N值设MN= Pmax。 </p><p>事实证明N = 11的最大值是通过将11分成4个相等的部分得到的这导致Pmax =11/44;即M11= 14641/256 = 57.19140625,这是终止小数。 </p><p>然而对于N = 8通过将其分成三个相等的部分来实现最大值因此M8= 512/27这是非终止小数。 </p><p>如果MN是非终止小数则令DN= N如果MN是终止小数则DN= -N。 </p><p>例如5≤N≤100的ΣDN是2438。 </p><p>求ΣDN为5≤N≤10000。 </p></section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler183()</code>应该返回48861552。
testString: 'assert.strictEqual(euler183(), 48861552, "<code>euler183()</code> should return 48861552.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler183() {
// Good luck!
return true;
}
euler183();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>