Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
146407 杜禹轩 删除数字字符 C++ Compile Error 0 MS 0 KB 237 2026-01-28 14:07:52

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ char c[1000001],a,b; cin>>c; int i=i-1; for(c[i]!='\0'){ i++; if(c[i]>='0'and c[i]<='9'){ continue; }else{ cout<<c[i]; } } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:16: error: expected ';' before ')' token
  for(c[i]!='\0'){
                ^
Main.cc:7:10: warning: statement has no effect [-Wunused-value]
  for(c[i]!='\0'){
          ^
Main.cc:17:1: error: expected primary-expression at end of input
 }
 ^
Main.cc:17:1: error: expected ';' at end of input
Main.cc:17:1: error: expected primary-expression at end of input
Main.cc:17:1: error: expected ')' at end of input
Main.cc:17:1: error: expected statement at end of input
Main.cc:4:18: warning: unused variable 'a' [-Wunused-variable]
  char c[1000001],a,b; 
                  ^
Main.cc:4:20: warning: unused variable 'b' [-Wunused-variable]
  char c[1000001],a,b; 
                    ^
Main.cc:17:1: error: expected '}' at end of input
 }
 ^