| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 121352 | 任艺宸 | 字符串中最大的数字 | C++ | Compile Error | 0 MS | 0 KB | 470 | 2025-06-07 11:57:53 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ char a[1000000000]; cin>>a; int max=a[i]-'0',l; l=strlen(a); for(int i=0;i<l;i++){ if(a[i]-'0'>=max){ max=a[i]-'0' } } cout<<max<<endl; return 0; }
Main.cc: In function 'int main()':
Main.cc:10:15: error: 'i' was not declared in this scope
int max=a[i]-'0',l;
^
Main.cc:11:5: error: 'l' was not declared in this scope
l=strlen(a);
^
Main.cc:15:9: error: expected ';' before '}' token
}
^