题解 | 统计单词
统计单词
https://www.nowcoder.com/practice/11c6e7c9987c4ab48f8cdd8834c27064
#include<iostream>
#include<vector>
using namespace std;
int main() {
string s;
while (cin >> s) {
if (s[s.length() - 1] == '.') {
printf("%d ", s.length() - 1);
break;
}
else {
printf("%d ", s.length());
}
}
}