Run ID:113272

提交时间:2025-03-15 16:16:31

#include <bits/stdc++.h> using namespace std; int main() { char s[1005]; gets(s); int n=0; int m=strlen(s); for(int i=0;i<m;i++){ if (s[i]==' '){ cout << n << ','; n = 0; continue; } n = n + 1; } cout << n << endl; return 0; }