69 lines
997 B
Markdown
69 lines
997 B
Markdown
---
|
||
id: 5900f4931000cf542c50ffa5
|
||
challengeType: 5
|
||
videoUrl: ''
|
||
title: 问题294:数字总和-经验#23
|
||
---
|
||
|
||
## Description
|
||
<section id="description">
|
||
对于正整数k,将d(k)定义为通常的十进制表示形式中k的位数之和。
|
||
因此d(42)= 4 + 2 = 6。
|
||
|
||
|
||
对于正整数n,将S(n)定义为具有以下属性的正整数k <10n的数量:
|
||
k可被23整除
|
||
d(k)= 23。
|
||
|
||
给出S(9)= 263626和S(42)= 6377168878570056。
|
||
|
||
|
||
找到S(1112)并给出答案mod 109。
|
||
</section>
|
||
|
||
## Instructions
|
||
<section id="instructions">
|
||
</section>
|
||
|
||
## Tests
|
||
<section id='tests'>
|
||
|
||
```yml
|
||
tests:
|
||
- text: <code>euler294()</code>应该返回789184709。
|
||
testString: assert.strictEqual(euler294(), 789184709);
|
||
|
||
```
|
||
|
||
</section>
|
||
|
||
## Challenge Seed
|
||
<section id='challengeSeed'>
|
||
|
||
<div id='js-seed'>
|
||
|
||
```js
|
||
function euler294() {
|
||
// Good luck!
|
||
return true;
|
||
}
|
||
|
||
euler294();
|
||
|
||
```
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</section>
|
||
|
||
## Solution
|
||
<section id='solution'>
|
||
|
||
```js
|
||
// solution required
|
||
```
|
||
|
||
/section>
|