ROSECODE 559
Balanced numbers revisited
A positive integer with k (decimal) digits is called balanced if its first digits sum to the same value as its last digits, where , pronounced ceiling of x, is the smallest integer x, thus and .
For example, 77, 101, 13722, and 585774 are balanced numbers.
)
You are given: 634521,744405873 for a threshold of 12345678
[My timing: 1 s]
Find the number and the sum of all balanced numbers n for
[My timing: 1 s]