Solved Euler Problem #12