본문 바로가기
알고리즘/문자와 문자열

world cup 더블릿

by tryotto 2019. 2. 28.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdio.h>
 
int main() {
    int t, n;
    scanf("%d %d"&t, &n);
        
    int tmp = 0;
    while (t--) {
        char country[10];
        int score;
        scanf("%s %d", country, &score);
        tmp += score;
    }
 
    int rst = 3 * n - tmp;
    printf("%d", rst);
}
 
cs


'알고리즘 > 문자와 문자열' 카테고리의 다른 글

2908 상수  (0) 2020.01.04
1157 단어공부  (0) 2020.01.03
11654 아스키 코드  (0) 2020.01.03
blurred vision 더블릿  (0) 2019.03.01
검은 점 세기 더블릿  (0) 2019.02.28