title: Java incrementation numbering
body: <p>The problem is that I can't properly display an output.<br> 
  Input:</p>
  
  <p>6 <br>
  Berik 78 <br>
  Zeynep 100 <br>
  Saniya 75 <br>
  Daulet 45 <br>
  Abay 96 <br>
  Andrey 75 <br></p>
  
  <p>Expected Output:</p>
  
  <pre><code>1) Zeynep: 100
  2) Abay: 96
  3) Berik: 78
  4) Saniya: 75
  5) Andrey: 75
  6) Daulet: 45
  </code></pre>
  
  <p>My Output:</p>
  
  <pre><code>1) Zeynep: 100
  2) Abay: 96
  3) Berik: 78
  4) Saniya: 75
  4) Andrey: 75
  5) Daulet: 45
  </code></pre>
  
  <p>As you can see, the numbering is incorrect. Bug must be somewhere in incrementation logic when two points are equal. I pass numbering as an argument to the printMax method</p>
  
  <pre><code>import java.util.ArrayList;
  import java.util.Scanner;
  
  public class a1_t13 {
  public static void main(String[] args) {
      Scanner input = new Scanner(System.in);
  
      int num = input.nextInt();
      ArrayList&lt;Integer&gt; scores_unsorted = new ArrayList&lt;&gt;();
      ArrayList&lt;String&gt; names_unsorted = new ArrayList&lt;&gt;();
  
  
      for (int i=0; i&lt;num; i++) {
          String value = input.next();
          int numValue = input.nextInt();
          scores_unsorted.add(numValue);
          names_unsorted.add(value);
      }
  
      int b = 1;
      for (int z = 0; z&lt;num;z++) {
          int c = getMax(scores_unsorted);
          printMax(c, names_unsorted, scores_unsorted, b);
          b++;     //&lt;================ HERE I'M DOING AN INCREMENTATION
  
      }
  
  }
  
  public static int getMax(ArrayList list) {
      int max = 0;
      for(int i=0;i&lt;list.size();i++) {
          if (max&lt; (int)list.get(i)) {
              max = (int) list.get(i);
          }
      }
      return max;
  }
  
  
  public static void printMax(int score, ArrayList names_unsorted, ArrayList scores_unsorted, int order) {
      for (int i=0;i&lt;names_unsorted.size();i++) {
          if ((int) scores_unsorted.get(i) == score) {
              int score_index = scores_unsorted.indexOf(Integer.valueOf(score));
              System.out.println(order+")"+names_unsorted.get(score_index).toString()+": "+score);
              scores_unsorted.remove(score_index);
              names_unsorted.remove(score_index);
          }
      }
  }
  </code></pre>
  
  <p>}</p>