Solved problem 56 (powerful digit sum).