Solved Euler9.