#include <iostream>
#include <string>
using namespace std;
int main()
{
string s;
getline(cin, s);
int n = 0;
for (int i = 0; i < s.length(); i++)
{
if (isalpha(s[i]))
{
s[i] = toupper(s[i]);
n += (s[i] - 'A' + 1);
}
}
int cnt0 = 0, cnt1 = 0;
while (n)
{
if (n % 2 == 0)
{
cnt0++;
}
else
{
cnt1++;
}
n = n / 2;
}
cout << cnt0 << " " << cnt1;
return 0;
}
1057 数零壹
最新推荐文章于 2021-06-16 14:33:38 发布