Advertisement
JeffGrigg

thirstyCrowProblem

Jul 6th, 2017
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 1.03 KB | None | 0 0
  1. import java.io.*;
  2. import java.util.*;
  3. import java.text.*;
  4. import java.math.*;
  5. import java.util.regex.*;
  6.  
  7. public class CandidateCode {
  8.     /*
  9.      * Complete the function below
  10.      */
  11.     public static int thirstyCrowProblem(int[] stonesPerPot, int numberOfPotsToOverflow) {
  12.         return 5+5; // <---<<<  Replace this with a real implementation.   >;->
  13.     }
  14.  
  15.     public static void main(String[] args) throws IOException {
  16.         Scanner in = new Scanner(System.in);
  17.         int numberOfPots = Integer.parseInt(in.nextLine().trim());
  18.         int[] stonesPerPot = new int[numberOfPots];
  19.         for (int index = 0; index < numberOfPots; index++) {
  20.             int thisOverflow = Integer.parseInt(in.nextLine().trim());
  21.             stonesPerPot[index] = thisOverflow;
  22.         }
  23.         int numberOfPotsToOverflow = Integer.parseInt(in.nextLine().trim());
  24.         int minimumNumberOfStones = thirstyCrowProblem(stonesPerPot, numberOfPotsToOverflow);
  25.         System.out.println(String.valueOf(minimumNumberOfStones));
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement