2018-09-30 22:01:58 +00:00
---
id: 5900f4931000cf542c50ffa5
title: 'Problem 294: Sum of digits - experience #23 '
2020-11-27 18:02:05 +00:00
challengeType: 5
2019-08-05 16:17:33 +00:00
forumTopicId: 301946
2021-01-13 02:31:00 +00:00
dashedName: problem-294-sum-of-digits---experience-23
2018-09-30 22:01:58 +00:00
---
2020-11-27 18:02:05 +00:00
# --description--
2018-09-30 22:01:58 +00:00
For a positive integer k, define d(k) as the sum of the digits of k in its usual decimal representation.
2020-11-27 18:02:05 +00:00
Thus d(42) = 4+2 = 6.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
For a positive integer n, define S(n) as the number of positive integers k < 10n with the following properties : k is divisible by 23 and d(k) = 23.
2018-09-30 22:01:58 +00:00
You are given that S(9) = 263626 and S(42) = 6377168878570056.
Find S(1112) and give your answer mod 109.
2020-11-27 18:02:05 +00:00
# --hints--
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
`euler294()` should return 789184709.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
```js
assert.strictEqual(euler294(), 789184709);
2018-09-30 22:01:58 +00:00
```
2020-11-27 18:02:05 +00:00
# --seed--
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
## --seed-contents--
2018-09-30 22:01:58 +00:00
```js
function euler294() {
2020-09-15 16:57:40 +00:00
2018-09-30 22:01:58 +00:00
return true;
}
euler294();
```
2020-11-27 18:02:05 +00:00
# --solutions--
2018-09-30 22:01:58 +00:00
```js
// solution required
```