Little Jay

[C++] 백준 10214번 Baseball 본문

알고리즘/BOJ

[C++] 백준 10214번 Baseball

Jay, Lee 2021. 3. 1. 23:08
#include <iostream>
using namespace std;

int main() {

	int testCase;
	cin >> testCase;
	for (int i = 0; i < testCase; i++) {
		int a, b;
		int sum1 = 0;
		int sum2 = 0;
		for (int k = 0; k < 9; k++) {
			cin >> a >> b;
			sum1 += a;
			sum2 += b;
		}
		if (sum1 > sum2) {
			cout << "Yonsei" << endl;
		}
		else if (sum1 < sum2) {
			cout << "Korea" << endl;
		}
		else {
			cout << "Draw" << endl;
		}
	}

	return 0;
}

'알고리즘 > BOJ' 카테고리의 다른 글

[C++] 백준 2593번 대표값  (0) 2021.03.04
[C++] 백준 2748번 피보나치 수 2  (0) 2021.03.04
[C++] 백준 2953번 나는 요리사다  (0) 2021.03.01
[C++] 백준 2908번 상수  (0) 2021.03.01
[C++] 백준 1267번 핸드폰 요금  (0) 2021.02.28
Comments