# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
925176 |
2024-02-10T23:49:37 Z |
jpfr12 |
Bridž (COCI17_bridz) |
C++17 |
|
1 ms |
540 KB |
#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <queue>
#include <deque>
#include <set>
#include <string>
#include <map>
#include <math.h>
#include <cmath>
#include <climits>
#include <unordered_map>
#include <unordered_set>
#include <assert.h>
#include <fstream>
#include <bitset>
#include <iomanip>
typedef long long ll;
typedef unsigned long long int ull;
using namespace std;
int MOD = (int)1e9+7;
int MAXN = 1e6;
//classes
//global
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
//ifstream fin("teamwork.in");
//ofstream fout("teamwork.out");
//stop
int t;
cin >> t;
ll sum = 0;
ll A = 0, K = 0, Q = 0, J = 0;
while(t--){
string s;
cin >> s;
for(int i = 0; i < 13; i++){
if(s[i] == 'A') A++;
else if(s[i] == 'K') K++;
else if(s[i] == 'Q') Q++;
else if(s[i] == 'J') J++;;
}
}
sum = A*4 + K*3 +Q*2 + J;
cout << sum << '\n';
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
344 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
1 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
540 KB |
Output is correct |