Euler Project in Java