| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 132538 | 黄枳润 | 31单词的长度 | C++ | Compile Error | 0 MS | 0 KB | 485 | 2025-10-08 19:33:49 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ string s; getline(cin,s); int len=s.size(); int k=0; for (int i=0;i<len;i++){ if(s[i]!=' '){ k++; } else if(s[i]==' '){ if(k!=0){ cout<<k<<','; k=0; } } } cout<<k return 0; }
Main.cc: In function 'int main()':
Main.cc:24:5: error: expected ';' before 'return'
return 0;
^