#include <iostream>
using namespace std;
#include <string>
int main() {
string str;
getline(cin,str);
int cnt = 0;
for(auto c : str){
if(c>='A' && c<='Z'){
cnt++;
}
}
cout << cnt << endl;
}
string和getline的简单用法

京公网安备 11010502036488号