Project Euler solutions using Java