# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
244815 |
2020-07-05T06:47:33 Z |
VEGAnn |
Bridž (COCI17_bridz) |
C++14 |
|
6 ms |
384 KB |
#include <bits/stdc++.h>
#define sz(x) ((int)x.size())
using namespace std;
const int N = 110;
string s;
int n, ans = 0;
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
#ifdef _LOCAL
freopen("in.txt","r",stdin);
#endif // _LOCAL
cin >> n;
for (int it = 0; it < n; it++){
cin >> s;
for (int j = 0; j < sz(s); j++) {
if (s[j] == 'A')
ans += 4; else
if (s[j] == 'K')
ans += 3; else
if (s[j] == 'Q')
ans += 2; else
if (s[j] == 'J')
ans += 1;
}
}
cout << ans;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
384 KB |
Output is correct |
2 |
Correct |
5 ms |
384 KB |
Output is correct |
3 |
Correct |
5 ms |
384 KB |
Output is correct |
4 |
Correct |
5 ms |
384 KB |
Output is correct |
5 |
Correct |
5 ms |
384 KB |
Output is correct |
6 |
Correct |
5 ms |
384 KB |
Output is correct |
7 |
Correct |
5 ms |
384 KB |
Output is correct |
8 |
Correct |
5 ms |
384 KB |
Output is correct |
9 |
Correct |
6 ms |
384 KB |
Output is correct |
10 |
Correct |
6 ms |
384 KB |
Output is correct |