본문으로 바로가기

[Baekjoon 3단계(4)] 15552번 : 빠른 A+B

category Baekjoon 문제풀이 2021. 8. 31. 13:43

출제 링크 : https://www.acmicpc.net/problem/15552

 

15552번: 빠른 A+B

첫 줄에 테스트케이스의 개수 T가 주어진다. T는 최대 1,000,000이다. 다음 T줄에는 각각 두 정수 A와 B가 주어진다. A와 B는 1 이상, 1,000 이하이다.

www.acmicpc.net

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Solution
{
    class Program
    {
        static void Main(string[] args)
        {

            int T = int.Parse(Console.ReadLine());
            StringBuilder sb = new StringBuilder();
            
            for(int i =0;i<T;i++)
            {
                string[] data = Console.ReadLine().Split();

                sb.Append(int.Parse(data[0]) + int.Parse(data[1]) + "\n");
            }

            Console.WriteLine(sb);
        }     
    }
}