제출 #239059

#제출 시각아이디문제언어결과실행 시간메모리
239059AutoratchBridž (COCI17_bridz)C++14
50 / 50
6 ms384 KiB
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n; cin >> n; int ans = 0; while(n--) { string s; cin >> s; for(char c : s) { if(c=='A') ans+=4; else if(c=='K') ans+=3; else if(c=='Q') ans+=2; else if(c=='J') ans++; } } cout << ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...