Files
freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-387-harshad-numbers.md
Oliver Eyton-Williams ee1e8abd87 feat(curriculum): restore seed + solution to Chinese (#40683)
* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
2021-01-12 19:31:00 -07:00

47 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5900f4f11000cf542c510003
title: 问题387Harshad数字
challengeType: 5
videoUrl: ''
dashedName: problem-387-harshad-numbers
---
# --description--
Harshad或Niven数字是可以被其数字之和整除的数字。 201是一个Harshad数因为它可以被3整数它的数字之和。当我们截断201的最后一个数字时我们得到20这是一个Harshad数。当我们截断20的最后一位数时我们得到2这也是一个Harshad数。让我们调用一个Harshad数字在递归截断最后一个数字的同时总是会产生一个Harshad数字一个正可截断的Harshad数字。
另外201/3 = 67这是素数。让我们称一个Harshad数当它除以它的数字之和时得到一个强Harshad数的素数。
现在取2011年的数字。当我们截断它的最后一位数时我们得到201一个强大的Harshad数也是可以截断的。让我们称这样的素数强大正确的可截断的哈尔沙德素数。
你得到的是强度小可截断的Harshad素数小于10000的总和是90619。
找到小于1014的强可可截断的Harshad素数的总和。
# --hints--
`euler387()`应该返回696067597313468。
```js
assert.strictEqual(euler387(), 696067597313468);
```
# --seed--
## --seed-contents--
```js
function euler387() {
return true;
}
euler387();
```
# --solutions--
```js
// solution required
```