| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 62399 | 祝家懿 | 字符串中最大的数字II | C++ | Wrong Answer | 1 MS | 276 KB | 320 | 2023-12-23 16:52:20 |
# include<iostream> # include<cstring> using namespace std; int main(){ string s,x; int a=0; cin>>s; a=s.size(); for(int i=0;i<a;i++){ if(s[i]>='0'&&s[i]<='9'){ x[i]=s[i]; } } char max=-2147483649; for(int i=0;i<a;i++){ if(x[i]>max){ max=x[i]; } } cout<<max; return 0; }
------Input------
-9.87654321
------Answer-----
9
------Your output-----
@