Submission #86269

# Submission time Handle Problem Language Result Execution time Memory
86269 2018-11-25T19:32:37 Z MatesV13 Bridž (COCI17_bridz) C++11
50 / 50
3 ms 732 KB
#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 time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 468 KB Output is correct
3 Correct 2 ms 468 KB Output is correct
4 Correct 2 ms 468 KB Output is correct
5 Correct 2 ms 480 KB Output is correct
6 Correct 2 ms 480 KB Output is correct
7 Correct 2 ms 492 KB Output is correct
8 Correct 2 ms 560 KB Output is correct
9 Correct 3 ms 728 KB Output is correct
10 Correct 3 ms 732 KB Output is correct