Written by Master

大师 · 发布于 2024-11-23 · 浏览 562 回复 1

include <bits/stdc++.h>

using namespace std; //#define _debug 0

int main() {

string s;
getline(cin, s);
int x = 0, d = 0, k = 0;
for (auto it = s.begin(); it != s.end(); it++) {
	if (islower(*it)) {
		x++;
	} else if (iswupper(*it)) {
		d++;
	} else if (*it == ' ') {
		k++;
	}
}
cout << d << " " << x << " " << k;
return 0;

}

全部回复 共 1 条

  1. 123Y456 #1 ·

    (内容为空)

发表回复