freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-88-product-sum-numb...

56 lines
1.4 KiB
Markdown
Raw Normal View History

---
id: 5900f3c51000cf542c50fed6
challengeType: 5
videoUrl: ''
2020-10-01 15:54:21 +00:00
title: 问题88产品总和数
---
## Description
<section id="description">可以写为至少两个自然数{a1a2...ak}的给定集合的和和乘积的自然数N称为乘积和数N = a1 + a2 + ... + ak = a1×a2×...×ak。例如6 = 1 + 2 + 3 = 1×2×3。对于给定的大小集合k我们将使用此属性调用最小的N作为最小乘积和数。尺寸组k = 2,3,4,5和6的最小乘积和数如下。 k = 24 = 2×2 = 2 + 2k = 36 = 1×2×3 = 1 + 2 + 3k = 48 = 1×1×2×4 = 1 + 1 + 2 + 4k = 58 = 1×1×2×2×2 = 1 + 1 + 2 + 2 + 2k = 612 = 1×1×1×1×2×6 = 1 + 1 + 1 + 1 + 2 +因此对于2≤k≤6所有最小乘积和数之和为4 + 6 + 8 + 12 = 30;请注意8只计算总和一次。实际上由于2≤k≤12的完整最小乘积和数是{4,6,8,12,15,16}因此总和为61.所有最小乘积和的总和是多少数字为2≤k≤12000 </section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler88()</code>应该返回7587457。
testString: assert.strictEqual(euler88(), 7587457);
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler88() {
// Good luck!
return true;
}
euler88();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
/section>