文章
15
粉丝
0
获赞
25
访问
1.5k
#include <iostream>
#include <string>
#include <cctype>
using namespace std;
int main() {
string str;
int cnt;
while(cin >> str) {
if(str.size() == 1 && str[0] == '.') continue; //不加这句只过80%
cnt = 0;
for(int i = 0; i < str.size(); i++)
if(islower(str[i]) || isupper(str[i])) cnt++;
cout << cnt << ' ';
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发