56 lines
1.7 KiB
Markdown
56 lines
1.7 KiB
Markdown
---
|
||
id: 5900f4f11000cf542c510003
|
||
challengeType: 5
|
||
title: 'Problem 387: Harshad Numbers'
|
||
videoUrl: ''
|
||
localeTitle: 问题387:Harshad数字
|
||
---
|
||
|
||
## 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, "<code>euler387()</code> should return 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>
|