Run ID:118964

提交时间:2025-05-11 14:44:59

#include<iostream> #include<cstdio> #include<cstring> #include<cmath> using namespace std; int main(){ string s2; int t=0; getline(cin,s2); int len=s2.length(); for(int i=0;i<len;i++){ if(s2[i]!=' '){ t++; } else if(s2[i]==' '&& t !=0){ cout<<t<<","; t=0; } if(i==len-1&&t!=0){ cout<<t; } } }