Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- import java.util.*;
- import java.text.*;
- import java.math.*;
- import java.util.regex.*;
- public class CandidateCode {
- /*
- * Complete the function below
- */
- public static int thirstyCrowProblem(int[] stonesPerPot, int numberOfPotsToOverflow) {
- return 5+5; // <---<<< Replace this with a real implementation. >;->
- }
- public static void main(String[] args) throws IOException {
- Scanner in = new Scanner(System.in);
- int numberOfPots = Integer.parseInt(in.nextLine().trim());
- int[] stonesPerPot = new int[numberOfPots];
- for (int index = 0; index < numberOfPots; index++) {
- int thisOverflow = Integer.parseInt(in.nextLine().trim());
- stonesPerPot[index] = thisOverflow;
- }
- int numberOfPotsToOverflow = Integer.parseInt(in.nextLine().trim());
- int minimumNumberOfStones = thirstyCrowProblem(stonesPerPot, numberOfPotsToOverflow);
- System.out.println(String.valueOf(minimumNumberOfStones));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement