2018-09-30 22:01:58 +00:00
---
id: 5900f4461000cf542c50ff58
challengeType: 5
title: 'Problem 217: Balanced Numbers'
---
## Description
< section id = 'description' >
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.
So, for example, all palindromes are balanced, as is 13722.
2018-10-08 00:01:53 +00:00
Let T(n) be the sum of all balanced numbers less than 10n.
Thus: T(1) = 45, T(2) = 540 and T(5) = 334795890.
2018-09-30 22:01:58 +00:00
Find T(47) mod 315
< / section >
## Instructions
< section id = 'instructions' >
< / section >
## Tests
< section id = 'tests' >
```yml
2018-10-04 13:37:37 +00:00
tests:
- text: < code > euler217()</ code > should return 6273134.
2019-07-27 02:26:37 +00:00
testString: assert.strictEqual(euler217(), 6273134);
2018-09-30 22:01:58 +00:00
```
< / section >
## Challenge Seed
< section id = 'challengeSeed' >
< div id = 'js-seed' >
```js
function euler217() {
// Good luck!
return true;
}
euler217();
```
< / div >
< / section >
## Solution
< section id = 'solution' >
```js
// solution required
```
2019-07-18 15:24:12 +00:00
2018-09-30 22:01:58 +00:00
< / section >