| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 155851 | 王晏林 | 字符串中最大的数字II | C++ | Compile Error | 0 MS | 0 KB | 312 | 2026-06-14 10:50:16 |
#include<bits/stdc++.h> using namespace std; int main(){ string n; cin>>n; char ='0'; for(int i=0;i<n.length();i++){ char c=n[i]; if(c>='0'&&c<='9'){ if(c>m){ m=c; } } } cout<<m<<endl; return 0; }
Main.cc: In function 'int main()':
Main.cc:6:10: error: expected unqualified-id before '=' token
char ='0';
^
Main.cc:7:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;im){
^
Main.cc:15:10: error: 'm' was not declared in this scope
cout<