Run ID:82365

提交时间:2024-07-13 11:02:50

#include<bits/stdc++.h> using namespace std; int main(){ string s; getline(cin,s); int len=s.size(); int k=0; for(int i=0;i<len;i++){ if(s[i]!=' '){ k++ }else if(a[i]==' '){ if(k!=0){ cout<<k<<' '; k=0; } } cout<<k; return 0; }