Project Euler website exercises, in java