본문 바로가기

Dev/BAEKJOON 백준

[백준/BOJ] 백준 코딩 알고리즘 10950번/C++

728x90
반응형

백준 코딩 알고리즘 문제 10950

 

백준 코딩 알고리즘 문제 10950번 풀이 - 사용 언어: C++

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <iostream>
 
using namespace std;
 
int main() {
 
    int testCase = 0;
    int a = 0, b = 0;
 
    cin >> testCase;
 
    int* resultArray = new int[testCase]();
 
    for (int i = 0; i < testCase; i++) {
        cin >> a >> b;
        resultArray[i] = a + b;
    }
 
    for (int i = 0; i < testCase; i++) {
        cout << resultArray[i] << endl;
    }
 
    return 0;
}
cs
728x90
반응형