题解 | #统计单词#
统计单词
https://www.nowcoder.com/practice/11c6e7c9987c4ab48f8cdd8834c27064
#include<iostream>
using namespace std;
string a[10000];
int main()
{
int n = 0;
while(cin >> a[n]) n++;
for(int i = 0;i < n;i ++)
{
if(i != n - 1)
cout << a[i].length() << " ";
else
cout << a[i].length() - 1 << " ";
}
}