#include<bits/stdc++.h>
using namespace std;
string words;
int length[300];
int main(){
int i=0;
getline(cin,words);
for(int j=0;j<words.length();j++){
if(words[j]==' '){
if(words[j-1]!=' '){
i++;
}
continue;
}
length[i]++;
}
for(int j=0;j<i;j++){
cout<<length[j];
if(j!=i-1){
cout<<",";
}
}
return 0;
}
为什么这段代码只能得 0 分?求 dl。