#include <stdio.h>
#include <string.h>
#include <stdlib.h>
using namespace std;
#define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
int main() {
  // freopen
  
    int i, A[10], B[10], as=0, bs =0, lw =0;
    
    for(i=0; i<10; i++) {
        scanf("%d", &A[i]);
        
    }
    
    for(i=0; i< 10; i++) {
        scanf("%d", &B[i]);
    }
    
    for(i=0; i< 10; i++) {
        if(A[i] > B[i]) {
            as = as +3;
            lw = 1;
        }
        else if (A[i] < B[i]){
            bs = bs + 3;
            lw = 2;
        }
        else {
            as += 1;
            bs += 1;
        }
    }
    printf("%d %d\n", as, bs);
    if(as == bs) {
        if(lw == 0) printf("D\n");
        else if (lw == 1) printf("A\n");
        else printf("B\n");
    }
    else if (as > bs) printf("A\n");
    else printf("B\n");
    return 0;
}

'코딩테스트' 카테고리의 다른 글
| 연속 부분 증가수열 (2) | 2024.09.17 | 
|---|---|
| 온도의 최댓값 (1차원 배열 구간합 : 제한시간 1초) (0) | 2024.09.17 | 
| 가위 바위 보 (기본코딩 설계) (0) | 2024.09.17 | 
| 층간 소음 (실시간 측정치) (0) | 2024.09.17 | 
| Anagram (아나그램 : 구글 인터뷰 문제) (0) | 2024.09.17 | 
 
							 
							 
							