Refreshing the Euler solutions in Java