#include <iostream> using namespace std; int main() { string s; while (getline(cin, s)) { int alph = 0, space = 0, num = 0, other = 0; for (char c : s) { if (isalpha(c)) alph++; else if (c == 32) space++; else if (isdigit(c)) num++; else other++; } cout << alph << endl; cout << space << endl; cout << num << endl; cout << other << endl; } } // 64 位输出请用 printf("%lld")