文章
34
粉丝
89
获赞
172
访问
44.6k
#include<bits/stdc++.h>
using namespace std;
map<char,int> f = {{'J',1},{'Q',2},{'K',3},{'A',4} };
int main(){
int n;
cin >> n;
getchar();
int ans = 0;
// cout << f['1'];
while(n--){
string str;
getline(cin,str);
for(int i = 0;i < str.size();i++){
if(f[str[i]]){}
ans += f[str[i]];
}
}
cout << ans << endl;
}
登录后发布评论
暂无评论,来抢沙发