2018-09-30 22:01:58 +00:00
---
id: 5900f4461000cf542c50ff58
title: 'Problem 217: Balanced Numbers'
2020-11-27 18:02:05 +00:00
challengeType: 5
2019-08-05 16:17:33 +00:00
forumTopicId: 301859
2021-01-13 02:31:00 +00:00
dashedName: problem-217-balanced-numbers
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
A positive integer with k (decimal) digits is called balanced if its first ⌈k/2⌉ digits sum to the same value as its last ⌈k/2⌉ digits, where ⌈x⌉, pronounced ceiling of x, is the smallest integer ≥ x, thus ⌈π⌉ = 4 and ⌈5⌉ = 5.
2020-11-27 18:02:05 +00:00
2018-09-30 22:01:58 +00:00
So, for example, all palindromes are balanced, as is 13722.
2020-11-27 18:02:05 +00:00
2018-10-08 00:01:53 +00:00
Let T(n) be the sum of all balanced numbers less than 10n.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
Thus: T(1) = 45, T(2) = 540 and T(5) = 334795890.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
Find T(47) mod 315
2018-09-30 22:01:58 +00:00
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
`euler217()` should return 6273134.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
```js
assert.strictEqual(euler217(), 6273134);
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 euler217() {
2020-09-15 16:57:40 +00:00
2018-09-30 22:01:58 +00:00
return true;
}
euler217();
```
2020-11-27 18:02:05 +00:00
# --solutions--
2018-09-30 22:01:58 +00:00
```js
// solution required
```