We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
// just to remove the first variable
int numberOfLines = scan.nextInt();
// the number of draws is the number of pairs + 1
while(scan.hasNext()) {
System.out.println(scan.nextInt()+1);
}
}
}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Maximum Draws
You are viewing a single comment's thread. Return to all comments →
import java.io.; import java.util.;
public class Solution {
}