Solved Project Euler Problem1