답안 #383142

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
383142 2021-03-28T22:09:13 Z Iwanttobreakfree Bridž (COCI17_bridz) C++
50 / 50
4 ms 492 KB
#include <iostream>
using namespace std;
int main(){
	long long int n,sum=0;
	string str;
	cin>>n;
	while(n--){
		cin>>str;
		for(int i=0;i<13;i++){
			if(str[i]=='A')sum+=4;
			if(str[i]=='K')sum+=3;
			if(str[i]=='Q')sum+=2;
			if(str[i]=='J')sum+=1;
		}
	}
	cout<<sum;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 492 KB Output is correct
8 Correct 2 ms 492 KB Output is correct
9 Correct 3 ms 364 KB Output is correct
10 Correct 4 ms 364 KB Output is correct