제출 #925176

#제출 시각아이디문제언어결과실행 시간메모리
925176jpfr12Bridž (COCI17_bridz)C++17
50 / 50
1 ms540 KiB
#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 timeMemoryGrader output
Fetching results...