| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 69187 | 许铭锐 | 31统计单词数 | C++ | Compile Error | 0 MS | 0 KB | 219 | 2024-03-31 09:08:25 |
#include<bits/stdc++.h> using namespace std; int main() { strig a; getline(cin,a); int =a.length(),c=0; fo(int i=0; i<b; i++) { if(a[i]==' '&&a[i+1]!=' '&&[i-1]!=0) c++; } cout<c+1; retur 0; }
Main.cc: In function 'int main()':
Main.cc:4:2: error: 'strig' was not declared in this scope
strig a;
^
Main.cc:5:14: error: 'a' was not declared in this scope
getline(cin,a);
^
Main.cc:6:6: error: expected unqualified-id before '=' token
int =a.length(),c=0;
^
Main.cc:7:5: error: expected primary-expression before 'int'
fo(int i=0; i