Run ID:118443

提交时间:2025-05-02 15:34:51

#include<bits/stdc++.h> char n[1001]; using namespace std; int main() { cin.getline(n,1000); int sd=0; for (int i = 0;i<strlen(n); i++) { if(n[i]!=' '){ sd++; } else{ cout<<sd<<","; sd=0; } } cout<<sd; return 0; }