ADUN Code Chunk Ignoring main() and class declaration
Scanner in = new Scanner(System.in);
String xStr = in.nextLine();
String yStr = in.nextLine();
if(xStr != null && yStr !=null){
BigInteger x = new BigInteger(xStr);
BigInteger y = new BigInteger(yStr);
BigInteger sum = x.add(y);
System.out.println(sum.toString());
}else{
System.exit(0);
}
INTEST
BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
String next;
try {
next = stdin.readLine();
String[] next_items = next.split(" ");
int input_size = Integer.parseInt(next_items[0]);
int divisor = Integer.parseInt(next_items[1]);
int counter = 0;
String line;
for(int i = 0; i < input_size; i++){
line = stdin.readLine();
int num = Integer.parseInt(line);
if(num%divisor==0)
counter++;
}
System.out.println(counter);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
GNY07A
Scanner in = new Scanner(System.in);
int item_size = Integer.parseInt(in.nextLine());
for(int i = 0; i < item_size; i ++){
String next = in.nextLine();
String[] next_items = next.split(" ");
int misspell_index = Integer.parseInt(next_items[0]);
String word = next_items[1];
StringBuilder sb = new StringBuilder(word);
sb.deleteCharAt(misspell_index-1);
word = sb.toString();
System.out.println(i+1 + " "+ word);
}
Please help, I just keep getting stuck with NZEC for all.