title: Identify the failed test cases
body: <p>I have participated in coding contest, where I have attempt the given problem, so I am supposed to come up with solution which should not only passing all the test cases, also well optimized in terms of time and space complexity, I have passed 3 out of 7 but I am still not able to identify the rest of the test cases, it is possible that I might be missing something, please help me to rectify the below problem statement.</p>
  
  <p><strong>PROBLEM STATEMENT:</strong></p>
  
  <p>The Powerpuff Girls (100 Marks)</p>
  
  <p>Professor Utonium is restless because of the increasing crime in the world. The number of villains and their activities has increased to a great extent. The current trio of Powerpuff Girls is not well to fight the evils of the whole world. Professor has decided to create the maximum number of Powerpuff Girls with the ingredients he has.</p>
  
  <p>There are N ingredients required in a certain quantity to create a Powerpuff Girl. Professor has all the N ingredients in his laboratory and knows the quantity of each available ingredient. He also knows the quantity of a particular ingredient required to create a Powerpuff Girl. Professor is busy with the preparations and wants to start asap.</p>
  
  <p>The villains, on the other hand, want to destroy the laboratory and stop Professor Utonium from creating more Powerpuff girls. Mojo Jojo is coming prepared with ammunition and Him is leading other villains like Princess, Amoeba Boys, Sedusa, Gangreen Gang etc.</p>
  
  <p>Professor does not have much time as villains will reach the laboratory soon. He is starting the process but does not know the number of Powerpuff Girls which will be created. He needs your help in determining the maximum number of Powerpuff Girls which will be created with the current quantity of ingredients.</p>
  
  <p>Example:</p>
  
  <p>Professor Utonium requires 3 ingredients to make Powerpuff Girls. The 3 ingredients are present in the laboratory in the given quantity:</p>
  
  <p><strong>To make a Powerpuff Girl, Professor Utonium requires:</strong></p>
  
  <p><strong>3 units of Ingredient A</strong></p>
  
  <p><strong>6 units of Ingredient B</strong></p>
  
  <p><strong>10 units of Ingredient C</strong></p>
  
  <p><strong><em>The maximum number of Powerpuff Girls that can be created is 3 as, after 3, Professor will run out of Ingredient C.</em></strong></p>
  
  <p>Can you determine the maximum number?</p>
  
  <p>Input Format</p>
  
  <p>The first line of input consists of the number of ingredients, N</p>
  
  <p>The second line of input consists of the N space-separated integers representing the quantity of each ingredient required to create a Powerpuff Girl.</p>
  
  <p>The third line of input consists of the N space-separated integers representing the quantity of each ingredient present in the laboratory.</p>
  
  <pre><code>Constraints
  
  1&lt;= N &lt;=10000000 (1e7)
  
  0&lt;= Quantity_of_ingredient &lt;= LLONG_MAX 
  Output Format
  </code></pre>
  
  <p>Print the required output in a separate line.</p>
  
  <pre><code>Sample TestCase 1
  
  Input
  4
  2 5 6 3 
  20 40 90 50 
  Output
  8
  </code></pre>
  
  <p><strong>SOLUTION CODE</strong></p>
  
  <pre><code>package com.mzk.poi;
  
  import java.util.ArrayList;
  import java.util.Collections;
  import java.util.List;
  import java.util.Scanner;
  
  public class PowerPuffGirls {
  
      private static final String SPACE = " ";
      private static final Integer INITAL_IDX = 0;
      private static final Integer LOWER_IDX = 1;
      private static final Integer SECOND_IDX = 2;
      private static final Integer MAX_LINES = 3;
      private static final Integer UPPER_IDX = 1000000;
      private static String[] UnitsArr = null;
      private static String[] totIngrdientsArr = null;
      private static int size = 0;
  
      public static void main(String[] args) {
          List&lt;Integer&gt; maxPowerPuffGirlsCreationList = new ArrayList&lt;Integer&gt;();
          Scanner stdin = new Scanner(System.in);
          String[] input = new String[MAX_LINES];
          try {
              for (int i = 0; i &lt; input.length; i++) {
                  input[i] = stdin.nextLine();
                  if (validateIngredienInput(input[INITAL_IDX])) {
                      System.exit(INITAL_IDX);
                  }
              }
          } finally {
              stdin.close();
  
          }
          int numOfIngredients = Integer.parseInt(input[INITAL_IDX]);
          String units = input[LOWER_IDX];
          UnitsArr = units.split(SPACE);
          String ingredients = input[SECOND_IDX];
          totIngrdientsArr = ingredients.split(SPACE);
  
          size = UnitsArr.length;
          int[] specifiedArrayOfUnits = convertToIntegerArray(UnitsArr);
          int[] totIngredientInLabArray = convertToIntegerArray(totIngrdientsArr);
          for (int i = 0; i &lt; size; i++) {
              totIngredientInLabArray[i] = Integer.parseInt(totIngrdientsArr[i]);
          }
  
          for (int i = 0; i &lt; numOfIngredients; i++) {
              maxPowerPuffGirlsCreationList.add(totIngredientInLabArray[i] / specifiedArrayOfUnits[i]);
          }
          System.out.println(Collections.min(maxPowerPuffGirlsCreationList));
  
      }
      /**
       * This method validates the first input 
       * @param noOfIngredients
       * @return boolean
       */
      private static boolean validateIngredienInput(String noOfIngredients) {
          int numOfIngredients = Integer.parseInt(noOfIngredients);
          boolean result = false;
          if (numOfIngredients &lt;= LOWER_IDX &amp;&amp; numOfIngredients &lt;= UPPER_IDX) {
              result = true;
              return result;
          }
          return result;
      }
  
      /**
       * This utility method convert the String array to Integer array
       * @param size
       * @param specifiedArrayOfUnits
       * @return int[]
       */
      private static int[] convertToIntegerArray(String[] arrayToBeParsed) {
          int array[] = new int[size];
          for (int i = INITAL_IDX; i &lt; size; i++) {
              array[i] = Integer.parseInt(arrayToBeParsed[i]);
          }
          return array;
      }
  }
  </code></pre>
  
  <p>The above solution has passed 3 test cases, remaining 7 are un identfied,Please help me to rectify or improve this code.</p>