Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- /** 배열을 통해서 풀지 말것 - 코드플러스 강의
- 하나하나 입력받고 풀면 된다.
- 테스트 케이스를 모를때 배열의 크기를 정하기 어렵다
- 배열의 낭비 **/
- public class Java10950 {
- public static void main(String args[]) {
- Scanner sc = new Scanner(System.in);
- int t = sc.nextInt();
- while(t > 0) {
- String a = sc.next();
- String b = sc.next();
- System.out.println(Integer.parseInt(a) + Integer.parseInt(b));
- t--;
- }
- }
- }
Add Comment
Please, Sign In to add comment