@@ -0,0 +1,1324 @@
+import java.util.*;%0Aimport java.util.stream.Collectors;%0Aimport java.util.stream.IntStream;%0A%0A@SuppressWarnings(%22unused%22)%0Apublic class P074 implements Puzzle %7B%0A%0A%0A    @Override%0A    public String solve() %7B%0A        final Map%3CInteger, Integer%3E factorialMap = IntStream.range(0, 10)%0A                .boxed()%0A                .collect(Collectors.toMap(k -%3E k,%0A                                          v -%3E IntStream.range(1, v + 1).reduce(1, (a, b) -%3E a * b)));%0A%0A        return %22%22 + IntStream.range(1, 1_000_000)%0A                .parallel()%0A                .filter(i -%3E length(factorialMap, i, 60))%0A                .count();%0A    %7D%0A%0A%0A    private static boolean length(Map%3CInteger, Integer%3E factorialMap, int n, final int targetLength) %7B%0A        Set%3CInteger%3E seen = new HashSet%3C%3E(Arrays.asList(n));%0A%0A        for (int length = 1; ; ++length) %7B%0A            n = factorialSum(factorialMap, n);%0A%0A            if (length %3E targetLength) %7B%0A                return false;%0A            %7D%0A            if (seen.contains(n)) %7B%0A                return length == targetLength;%0A            %7D%0A%0A            seen.add(n);%0A        %7D%0A    %7D%0A%0A    private static int factorialSum(Map%3CInteger, Integer%3E factorialMap, int n) %7B%0A        int sum = 0;%0A        for (; n %3E 0; n /= 10) %7B%0A            sum += factorialMap.get(n %25 10);%0A        %7D%0A%0A        return sum;%0A    %7D%0A%7D

add 74