/*
 *  Add any license header using tools << templates << licenses << default license
 */

package Implementation;

/**
 * @author mukul goyal
 */
import java.util.Scanner;
public class CutTheSticks {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a[] = new int[n];
        int i;
        for(i=0;i<n;i++)
            a[i] = sc.nextInt();
        int count;
        do{
        int min = 1000;
        for(i=0;i<n;i++){
            if(a[i]<min && a[i]!=0)
                min = a[i];
        }
        count=0;
        for(i=0;i<n;i++){
            if(a[i]!=0){
                a[i] = a[i] - min;
                count++;
            }
        }
            if(count==0)
                break;
            System.out.println(count);
        }
        while(count!=1);
    }
}

@@ -1,95 +1,4 @@
-/*%0A *  Add any license header using tools %3C%3C templates %3C%3C licenses %3C%3C default license%0A */%0A%0A
 pack
@@ -20,17 +20,16 @@
 ion;%0A%0A/*
-*
 %0A * @aut
@@ -36,24 +36,31 @@
 hor 
-mukul 
+-- rajat
 goyal
+715
 %0A */%0A
+ %0A
 impo

Update CutTheSticks.java