@@ -0,0 +1,1580 @@
+import java.io.IOException;%0Aimport java.math.BigInteger;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Paths;%0Aimport java.util.Comparator;%0Aimport java.util.List;%0Aimport java.util.stream.IntStream;%0A%0A@SuppressWarnings(%22unused%22)%0Apublic class P099 implements Puzzle %7B%0A%0A    @Override%0A    public String solve() %7B%0A        // Note: slow (~8 min)%0A%0A        try %7B%0A            final List%3CString%3E lines = Files.readAllLines(Paths.get(%22resources/p099_base_exp.txt%22));%0A%0A            final int maxIndex = IntStream.range(0, lines.size())%0A                    .parallel()%0A                    .boxed()%0A                    .map(i -%3E %7B%0A                        String%5B%5D parts = lines.get(i).split(%22,%22);%0A                        BigInteger base = new BigInteger(parts%5B0%5D);%0A                        int exponent = Integer.valueOf(parts%5B1%5D);%0A                        return new IndexedValue(i, base.pow(exponent));%0A                    %7D)%0A                    .max(Comparator.naturalOrder())%0A                    .orElseThrow(() -%3E new RuntimeException(%22nothing%22))%0A                    .index;%0A%0A            return %22%22 + maxIndex + 1;%0A        %7D catch (IOException e) %7B%0A            throw new RuntimeException(e);%0A        %7D%0A    %7D%0A%0A    private static class IndexedValue implements Comparable%3CIndexedValue%3E %7B%0A        int index;%0A        BigInteger value;%0A%0A        public IndexedValue(int index, BigInteger value) %7B%0A            this.index = index;%0A            this.value = value;%0A        %7D%0A%0A        @Override%0A        public int compareTo(IndexedValue o) %7B%0A            return value.compareTo(o.value);%0A        %7D%0A    %7D%0A%7D

add 99