#include <bits/stdc++.h> using namespace std; int main() { int count=0; char s; while(1){ s=getchar(); //注意空格不会被cin入字符s if(s=='.'){ cout<<count<<" "; break; } if(s==' '){ cout<<count<<" "; count=0; }else{ count++; } } }