본문 바로가기
알고리즘 & 자료구조/백준

백준 10953

by 신재권 2021. 8. 4.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;


public class Main10953 {

	public static void main(String[] args) throws IOException{
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));	
		int T = Integer.parseInt(bf.readLine());
		String[] str = new String[T];
	
		
		for(int i=0; i<T; i++){
			str[i] = bf.readLine();
		}
		
		for(int i=0; i<T; i++){
			StringTokenizer st = new StringTokenizer(str[i],",",false);
			int A = Integer.parseInt(st.nextToken());
			int B = Integer.parseInt(st.nextToken());
			System.out.println(A+B);
		}
		
	}

}

'알고리즘 & 자료구조 > 백준' 카테고리의 다른 글

백준 9093  (0) 2021.08.05
백준 2558  (0) 2021.08.04
백준 10828  (0) 2021.08.04
백준 2839  (0) 2021.08.03
백준 2775  (0) 2021.07.28