Project Euler #217: Balanced Numbers