Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
62403 祝家懿 字符串中最大的数字II C++ Wrong Answer 1 MS 276 KB 320 2023-12-23 16:53:57

Tests(4/10):


Code:

# 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; }


Run Info:

------Input------
-9.87654321
------Answer-----
9
------Your output-----
@