| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 157610 | 王润中 | 删除数字字符 | C++ | Compile Error | 0 MS | 0 KB | 343 | 2026-08-08 09:20:00 |
#include<iostream> #include<cstring> using namespace std; char a[1000005]; char b[1000005]; int s=; int main(){ cin.gets(a); int l=strlen(a); for(int i=0;i<l;i++){ if(a[i]>='0'&&'9'<=a[i]){ continue; } else{ b[s]=a[i]; s++; } } puts(b);
Main.cc:6:7: error: expected primary-expression before ';' token
int s=;
^
Main.cc: In function 'int main()':
Main.cc:8:9: error: 'std::istream {aka class std::basic_istream}' has no member named 'gets'
cin.gets(a);
^
Main.cc:19:12: error: expected '}' at end of input
puts(b);
^