| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 135880 | 鲁博睿 | 31统计单词数 | C++ | Compile Error | 0 MS | 0 KB | 264 | 2025-11-08 16:46:43 |
#include <bits/stdc++.h> ? 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]==' '&&s[i-1] !=' ') k++; if(i==len-1 && s[i] != ' '){ k++ } } cout<<k; return 0; }
Main.cc:1:26: warning: extra tokens at end of #include directive
#include ?
^
Main.cc: In function 'int main()':
Main.cc:12:3: error: expected ';' before '}' token
}
^