본문 바로가기

Algorithm

C++(씨쁠쁠)(cplusplus)-백준(baekjoon)(BaekJoon)코딩 5523번:경기 결과 답

반응형
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <iostream>
using namespace std;
int a, b, ac, bc, t;
int main() {
    cin >> t;
    while (t--)
    {
        cin >> a >> b;
        if (a > b) { ac++; }
        else if (a < b)
            bc++;
    }
    cout << ac << ' ' << bc << '\n';
}
cs