
출제 링크 : https://www.acmicpc.net/problem/11022
11022번: A+B - 8
각 테스트 케이스마다 "Case #x: A + B = C" 형식으로 출력한다. x는 테스트 케이스 번호이고 1부터 시작하며, C는 A+B이다.
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 = 1; i <= T; i++)
{
string[] data = Console.ReadLine().Split();
sb.Append($"Case #{i}: {data[0]} + {data[1]} = {int.Parse(data[0])+int.Parse(data[1])}\n");
}
Console.Write(sb);
}
}
}

'Baekjoon 문제풀이' 카테고리의 다른 글
| [Baekjoon 3단계(10)] 2439번 : 별 찍기 - 2 (0) | 2021.08.31 |
|---|---|
| [Baekjoon 3단계(9)] 2438번 : 별 찍기 - 1 (0) | 2021.08.31 |
| [Baekjoon 3단계(7)] 11021번 : A+B - 7 (0) | 2021.08.31 |
| [Baekjoon 3단계(6)] 2742번 : 기찍 N (0) | 2021.08.31 |
| [Baekjoon 3단계(5)] 2741번 : N 찍기 (0) | 2021.08.31 |