euler 41 solution java