Submission #86269

#TimeUsernameProblemLanguageResultExecution timeMemory
86269MatesV13Bridž (COCI17_bridz)C++11
50 / 50
3 ms732 KiB
#include <bits/stdc++.h> using namespace std; long long n, sum; string word; int main (){ ios::sync_with_stdio(0); cin.tie(0); cin >> n; for(int i=0;i<n;i++){ cin >> word; for(int j=0;j<13;j++){ if (word[j]=='X') continue; if (word[j]=='J') {sum = sum + 1; continue;} if (word[j]=='Q') {sum = sum + 2; continue;} if (word[j]=='K') {sum = sum + 3; continue;} if (word[j]=='A') {sum = sum + 4; continue;} } } cout << sum; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...