Run ID:135864
提交时间:2025-11-08 16:35:37
#include<bits/stdc++.h> using namespace std; int main(){ string a; getline(cin,a); int len=a.size(); int k=0; for(int i=0;i<len;i++){ if(a[i]!=' '){ k++; } else{ if(k!=0){ cout<<k<<","; k=0; } } if(i==len-1){ cout<<k; } } return 0; }