/**
 * Created by william on 11/26/2015.
 */
public class Solution {

    public static void main(String[] args) {


    }

    /**
     * Created by william on 11/27/2015.
     */
    public static final class Resolver {
        public static int[] resolve(int[] sticks) {
            throw new UnsupportedOperationException();
        }
    }
}

@@ -1,329 +1,1304 @@
-/**%0A * Created by william on 11/26/2015.%0A */%0Apublic class Solution %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A%0A%0A    %7D%0A%0A    /**%0A     * Created by william on 11/27/2015.%0A     */%0A    public static final class Resolver %7B%0A        public static int%5B%5D resolve(int%5B%5D sticks) %7B%0A            throw new UnsupportedOperationException
+import java.util.Arrays;%0Aimport java.util.LinkedList;%0Aimport java.util.List;%0Aimport java.util.Scanner;%0Aimport java.util.stream.IntStream;%0A%0A/**%0A * Created by william on 11/26/2015.%0A */%0Apublic class Solution %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        try (final Scanner scanner = new Scanner(System.in)) %7B%0A            final int num = scanner.nextInt();%0A            final int%5B%5D sticks = IntStream.range(0, num).map(i -%3E scanner.nextInt()).toArray();%0A            IntStream.of(Resolver.resolve(sticks)).forEach(System.out::println);%0A        %7D%0A    %7D%0A%0A    /**%0A     * Created by william on 11/27/2015.%0A     */%0A    public static final class Resolver %7B%0A        public static int%5B%5D resolve(int%5B%5D sticks) %7B%0A            final List%3CInteger%3E output = new LinkedList%3C%3E();%0A%0A            int%5B%5D remainSticks = Arrays.copyOf(sticks, sticks.length);%0A            Arrays.sort(remainSticks);%0A%0A            while (remainSticks.length %3E 0) %7B%0A                output.add(remainSticks.length);%0A                int cut = remainSticks%5B0%5D;%0A%0A                remainSticks = IntStream%0A                        .of(remainSticks)%0A                        .map(s -%3E s - cut)%0A                        .filter(s -%3E s %3E 0)%0A                        .toArray();%0A            %7D%0A%0A            return output.stream().mapToInt(i -%3E i).toArray
 ();%0A

add problem cut-the-sticks (with solution implementation)