freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-5-smallest-multiple...

64 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
id: 5900f3711000cf542c50fe84
challengeType: 5
title: 'Problem 5: Smallest multiple'
videoUrl: ''
localeTitle: 问题5最小的倍数
---
## Description
<section id="description"> 2520是可以除以1到10中的每个数字而没有任何余数的最小数字。从1到<code>n</code>所有数字均可被整除的最小正数是多少? </section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>smallestMult(5)</code>应该返回60。
testString: 'assert.strictEqual(smallestMult(5), 60, "<code>smallestMult(5)</code> should return 60.");'
- text: <code>smallestMult(7)</code>应该返回420。
testString: 'assert.strictEqual(smallestMult(7), 420, "<code>smallestMult(7)</code> should return 420.");'
- text: <code>smallestMult(10)</code>应返回2520。
testString: 'assert.strictEqual(smallestMult(10), 2520, "<code>smallestMult(10)</code> should return 2520.");'
- text: <code>smallestMult(13)</code>应返回360360。
testString: 'assert.strictEqual(smallestMult(13), 360360, "<code>smallestMult(13)</code> should return 360360.");'
- text: <code>smallestMult(20)</code>应该返回232792560。
testString: 'assert.strictEqual(smallestMult(20), 232792560, "<code>smallestMult(20)</code> should return 232792560.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function smallestMult(n) {
// Good luck!
return true;
}
smallestMult(20);
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>