Project Euler problem attempts in Java.