링크 : https://www.acmicpc.net/problem/5622
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(){
string s;
cin >> s;
int sum = 0;
for(char c : s){
if(c == 'A' || c == 'B' || c == 'C') sum += 3;
else if (c == 'D' || c == 'E' || c == 'F') sum += 4;
else if (c == 'G' || c == 'H' || c == 'I') sum += 5;
else if (c == 'J' || c == 'K' || c == 'L') sum += 6;
else if (c == 'M' || c == 'N' || c == 'O') sum += 7;
else if (c == 'Q' || c == 'R' || c == 'S' || c == 'P') sum += 8;
else if (c == 'T' || c == 'U' || c == 'V') sum += 9;
else sum += 10;
}
cout << sum;
return 0;
}