基础题
using namespace std;
int main()
{
int n;
string st[1001];
int res[1001]={0};
cin>>n;
for(int i=0;i<n;i++){
cin>>st[i];
for(int j=0;j<st[i].size();j++){
res[i]+=(st[i][j]-'A'+1);
}
cout<<res[i]<<endl;
}
return 0;
}