56 lines
1.5 KiB
Markdown
56 lines
1.5 KiB
Markdown
|
---
|
|||
|
id: 5900f40c1000cf542c50ff1e
|
|||
|
challengeType: 5
|
|||
|
title: 'Problem 159: Digital root sums of factorisations'
|
|||
|
videoUrl: ''
|
|||
|
localeTitle: 问题159:因子的数字根和
|
|||
|
---
|
|||
|
|
|||
|
## Description
|
|||
|
<section id="description">复合数可以通过许多不同的方式考虑。例如,不包括乘以一,24可以用7种不同的方式考虑: <p> 24 = 2x2x2x3 24 = 2x3x4 24 = 2x2x6 24 = 4x6 24 = 3x8 24 = 2x12 24 = 24 </p><p>回想一下,基数为10的数字的数字根是通过将该数字的数字加在一起而得到的,并重复该过程,直到到达的数字小于10.因此,467的数字根是8。应将数字根和(DRS)称为我们数字的各个因子的数字根的总和。下图显示了所有DRS值24.因子分解数字根Sum2x2x2x3 92x3x4 92x2x6 104x6 103x8 112x12 524 6 24的最大数字根和为11.函数mdrs(n)给出n的最大数字根和。所以mdrs(24)= 11。找到Σmdrs(n)为1 <n <1,000,000。 </p></section>
|
|||
|
|
|||
|
## Instructions
|
|||
|
<section id="instructions">
|
|||
|
</section>
|
|||
|
|
|||
|
## Tests
|
|||
|
<section id='tests'>
|
|||
|
|
|||
|
```yml
|
|||
|
tests:
|
|||
|
- text: <code>euler159()</code>应返回14489159。
|
|||
|
testString: 'assert.strictEqual(euler159(), 14489159, "<code>euler159()</code> should return 14489159.");'
|
|||
|
|
|||
|
```
|
|||
|
|
|||
|
</section>
|
|||
|
|
|||
|
## Challenge Seed
|
|||
|
<section id='challengeSeed'>
|
|||
|
|
|||
|
<div id='js-seed'>
|
|||
|
|
|||
|
```js
|
|||
|
function euler159() {
|
|||
|
// Good luck!
|
|||
|
return true;
|
|||
|
}
|
|||
|
|
|||
|
euler159();
|
|||
|
|
|||
|
```
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
</section>
|
|||
|
|
|||
|
## Solution
|
|||
|
<section id='solution'>
|
|||
|
|
|||
|
```js
|
|||
|
// solution required
|
|||
|
```
|
|||
|
</section>
|