#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
#define ll long long
string cs;
int main(){
getline(cin,cs);
int res = 0;
for(int i=0;i<cs.size();i++){
if(!isalpha(cs[i])){
continue;
}
//如果是大写
if(cs[i]>='A' && cs[i]<='Z'){
res += cs[i]-'A'+1;
} else{
res += cs[i]-'a'+1;
}
}
//cout << res << '\n';
//对应0和1的个数;
int ling=0,yi=0;
while(res){
if(res & 1){//如果是1
yi++;
}else{
ling++;
}
res >>=1;
}
cout << ling << " " << yi <<'\n';
return 0;
}
标签:std,1057,int,long,cs,零壹
From: https://www.cnblogs.com/chengyiyuki/p/18146701