# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
713848 | ALTAKEXE | Bridž (COCI17_bridz) | C++14 | 3 ms | 340 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>
using namespace std;
int main() {
//freopen("input.txt","r",stdin);
int n,sum=0;
cin>>n;
while(n--){
string a;
cin>>a;
for(int i=0;i<a.size();i++){
if(a[i]=='A') sum+=4;
if(a[i]=='K') sum+=3;
if(a[i]=='Q') sum+=2;
if(a[i]=='J') sum+=1;
}
}
cout<<sum;
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |