freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-159-digital-root-su...

43 lines
1.1 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: 5900f40c1000cf542c50ff1e
title: 问题159因子的数字根和
challengeType: 5
videoUrl: ''
dashedName: problem-159-digital-root-sums-of-factorisations
---
# --description--
复合数可以通过许多不同的方式考虑。例如不包括乘以一24可以用7种不同的方式考虑
24 = 2x2x2x3 24 = 2x3x4 24 = 2x2x6 24 = 4x6 24 = 3x8 24 = 2x12 24 = 24
回想一下基数为10的数字的数字根是通过将该数字的数字加在一起而得到的并重复该过程直到到达的数字小于10.因此467的数字根是8。应将数字根和DRS称为我们数字的各个因子的数字根的总和。下图显示了所有DRS值24.因子分解数字根Sum2x2x2x3 92x3x4 92x2x6 104x6 103x8 112x12 524 6 24的最大数字根和为11.函数mdrsn给出n的最大数字根和。所以mdrs24= 11。找到Σmdrsn为1 <n <1,000,000。
# --hints--
`euler159()`应返回14489159。
```js
assert.strictEqual(euler159(), 14489159);
```
# --seed--
## --seed-contents--
```js
function euler159() {
return true;
}
euler159();
```
# --solutions--
```js
// solution required
```