fork download
  1. import java.io.*;
  2. import java.util.*;
  3. public class Main {
  4. public static void main(String args[]) {
  5.  
  6. String input = "";
  7. try {
  8.  
  9. while((input = bReader.readLine()) != null) {
  10. String word[] = input.split(" ");
  11. if (word.length > 1) {
  12. int A = Integer.parseInt(word[0]);
  13. int B = Integer.parseInt(word[1]);
  14. System.out.println(A + B);
  15. }
  16. }
  17. } catch (IOException e){
  18. e.printStackTrace();
  19. }
  20. }
  21. }
Success #stdin #stdout 0.06s 32764KB
stdin
1
2 4
5 2
stdout
6
7