freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-387-harshad-numbers.md

56 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: 5900f4f11000cf542c510003
challengeType: 5
videoUrl: ''
localeTitle: 问题387Harshad数字
---
## Description
<section id="description"> Harshad或Niven数字是可以被其数字之和整除的数字。 201是一个Harshad数因为它可以被3整数它的数字之和。当我们截断201的最后一个数字时我们得到20这是一个Harshad数。当我们截断20的最后一位数时我们得到2这也是一个Harshad数。让我们调用一个Harshad数字在递归截断最后一个数字的同时总是会产生一个Harshad数字一个正可截断的Harshad数字。 <p>另外201/3 = 67这是素数。让我们称一个Harshad数当它除以它的数字之和时得到一个强Harshad数的素数。 </p><p>现在取2011年的数字。当我们截断它的最后一位数时我们得到201一个强大的Harshad数也是可以截断的。让我们称这样的素数强大正确的可截断的哈尔沙德素数。 </p><p>你得到的是强度小可截断的Harshad素数小于10000的总和是90619。 </p><p>找到小于1014的强可可截断的Harshad素数的总和。 </p></section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler387()</code>应该返回696067597313468。
testString: assert.strictEqual(euler387(), 696067597313468);
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler387() {
// Good luck!
return true;
}
euler387();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
/section>