@@ -0,0 +1,1053 @@
+import java.io.*;%0Aimport java.util.*;%0A%0Apublic class Solution %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */%0A        Scanner in = new Scanner(System.in);%0A        %0A        int n = in.nextInt();%0A        int%5B%5D nums = new int%5Bn%5D;%0A        for (int i = 0; i %3C n; i++) %7B%0A            nums%5Bi%5D = in.nextInt();%0A        %7D%0A        %0A        int size = n;%0A        while (size %3E 0) %7B%0A            System.out.println(size);%0A            %0A            int min = Integer.MAX_VALUE;%0A            for (int i = 0; i %3C n; i++) %7B%0A                if (nums%5Bi%5D != 0) %7B%0A                    min = Math.min(min, nums%5Bi%5D);%0A                %7D%0A            %7D%0A            %0A            size = 0;%0A            for (int i = 0; i %3C n; i++) %7B%0A                if (nums%5Bi%5D != 0) %7B%0A                    nums%5Bi%5D -= min;%0A                    %0A                    if (nums%5Bi%5D %3E 0) %7B%0A                        size++;%0A                    %7D%0A                %7D%0A            %7D%0A        %7D%0A    %7D%0A%7D%0A

Create CutTheSticks.java