//b1057
//字母ASC
#include <bits/stdc++.h>
using namespace std;
int main() {
string str;
getline(cin, str);
int sum = 0;
for (int i = 0; i < str.size(); i++)
if (isalpha(str[i]))
sum += (toupper(str[i]) - 'A' + 1);
int count0 = 0, count1 = 0;
while (sum) {
if (sum % 2 == 0)
count0++;
else if (sum % 2 == 1)
count1++;
sum /= 2;
}
printf("%d %d\n", count0, count1);
return 0;
}
B1057
最新推荐文章于 2022-02-17 22:45:37 发布