# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
244815 | VEGAnn | Bridž (COCI17_bridz) | C++14 | 6 ms | 384 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 |
---|---|---|---|---|
Fetching results... |