| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1300315 | tab | Bridž (COCI17_bridz) | C++20 | 2 ms | 576 KiB |
#include "bits/stdc++.h"
using namespace std;
#define intt int
#define fi first
#define se second
const intt mxN = 2e5 + 5;
const intt LG = 20;
const intt inf = 1e18;
intt n;
void _() {
cin >> n;
intt ans = 0;
for(intt i = 0; i < n; i++) {
string s;
cin >> s;
for(intt j = 0; j < (intt)s.size(); j++) {
if(s[j] == 'A') ans+=4;
if(s[j] == 'K') ans+=3;
if(s[j] == 'Q') ans+=2;
if(s[j] == 'J') ans+=1;
}
}
cout << ans << endl;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
intt t = 1, buu = 1;
// cin >> t;
while(t--){
// cout << "Case #" << buu++ << ": ";
_();
}
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
