Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
125013 王金檐 字符串中最大的数字II C++ Wrong Answer 1 MS 276 KB 248 2025-07-13 09:49:13

Tests(4/10):


Code:

#include <iostream> #include <cstring> using namespace std; char a[50]; int main(){ cin>>a; int n=strlen(a); char m='0'; for(int i=3;i<n;i++){ if(a[i]>0){ if(a[i]>m){ m=a[i]; } } } cout<<m; return 0; }


Run Info:

------Input------
-9.87654321
------Answer-----
9
------Your output-----
8