제출 #1265933

#제출 시각아이디문제언어결과실행 시간메모리
1265933canhnam357Bridž (COCI17_bridz)C++20
50 / 50
1 ms328 KiB
#include <bits/stdc++.h>
using namespace std;
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int n;
    cin >> n;
    int ans = 0;
    while (n--) {
        string s;
        cin >> s;
        for (char c : s) {
            if (c == 'A') ans += 4;
            else if (c == 'K') ans += 3;
            else if (c == 'Q') ans += 2;
            else if (c == 'J') ans += 1;
        }
    }   
    cout << ans;
    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...