Solve problems of Project Euler by java