# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
858364 | reginox | Bridž (COCI17_bridz) | C++17 | 1 ms | 600 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 ll long long
#define faster ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define sp << " "
#define task "card"
using namespace std;
ll t;
char c;
string s;
ll sum = 0;
int main(){
if(fopen(task".inp","r")){
freopen(task".inp","r",stdin);
freopen(task".out","w",stdout);
}
faster
cin >> t;
while(t--){
cin >> s;
for(ll i = 0; i < s.size(); i++){
c = s[i];
if(c=='A') sum+=4;
else if (c=='K') sum+=3;
else if (c=='Q') sum+=2;
else if (c=='J') sum++;
}
}
cout << sum;
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |