Submission #97898

#TimeUsernameProblemLanguageResultExecution timeMemory
97898AKaan37Bridž (COCI17_bridz)C++14
50 / 50
4 ms512 KiB
#include <bits/stdc++.h> using namespace std; typedef long long int lo; typedef pair< int,int > PII; #define fi first #define se second #define mp make_pair #define pb push_back #define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define FOR for(int i=1;i<=n;i++) const int inf = 1000000000; const int mod = 1000000007; const int KOK = 100000; const int li = 100005; const int LOG = 20; lo n,m,cev,x,k,a[li]; vector<int> v; char c; string s; int main(){ fio(); cin>>n; for(int i=0;i<n;i++){ cin>>s; for(int j=0;j<(int)s.size();j++){ if(s[j]=='A') cev+=4; if(s[j]=='Q') cev+=2; if(s[j]=='K') cev+=3; if(s[j]=='J') cev+=1; } } cout<<cev; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...