Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
105193 | 欧阳俊懿 | 统计数字字符个数 | C++ | Compile Error | 0 MS | 0 KB | 215 | 2025-01-12 17:04:13 |
#include<iostream> #include<cstring> using namespace std; int main(){ char t[256]; gets(t); int x; for(int i=0;i<strlen(t);i++) if(t[i]>='0'&&t[i]<='9') x++; cout<<x; return 0; }
Main.cc:1:19: warning: extra tokens at end of #include directive #include ^ Main.cc:2:19: warning: extra tokens at end of #include directive #include ^ Main.cc:3:1: error: stray '\302' in program using namespace std; ^ Main.cc:3:1: error: stray '\240' in program Main.cc:4:1: error: stray '\302' in program int main(){ ^ Main.cc:4:1: error: stray '\240' in program Main.cc:5:1: error: stray '\302' in program char t[256]; ^ Main.cc:5:1: error: stray '\240' in program Main.cc:6:1: error: stray '\302' in program gets(t); ^ Main.cc:6:1: error: stray '\240' in program Main.cc:7:1: error: stray '\302' in program int x; ^ Main.cc:7:1: error: stray '\240' in program Main.cc:8:1: error: stray '\302' in program for(int i=0;i='0'&&t[i]<='9') x++; ^ Main.cc:9:1: error: stray '\240' in program Main.cc:9:1: error: stray '\302' in program Main.cc:9:1: error: stray '\240' in program Main.cc:10:1: error: stray '\302' in program cout<