Guest User

Untitled

a guest
Apr 25th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3.  
  4. /** 배열을 통해서 풀지 말것 - 코드플러스 강의
  5. 하나하나 입력받고 풀면 된다.
  6. 테스트 케이스를 모를때 배열의 크기를 정하기 어렵다
  7. 배열의 낭비 **/
  8.  
  9. public class Java10950 {
  10.  
  11. public static void main(String args[]) {
  12.  
  13. Scanner sc = new Scanner(System.in);
  14.  
  15. int t = sc.nextInt();
  16.  
  17. while(t > 0) {
  18. String a = sc.next();
  19. String b = sc.next();
  20.  
  21. System.out.println(Integer.parseInt(a) + Integer.parseInt(b));
  22. t--;
  23. }
  24.  
  25. }
  26.  
  27. }
Add Comment
Please, Sign In to add comment