euler 42 solution java