Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
128051 唐诗阳 字符串中最大的数字 C++ Wrong Answer 1 MS 272 KB 369 2025-07-30 20:07:17

Tests(0/10):


Code:

#include<iostream> #include<cstdio> //scanf()\printf() #include<cstring> #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ char N[1001],max='0'; int s1=strlen(N); cin>>N; for(int i=0;i<=s1;i++){ if(N[i]>max){ max=N[i]; } } cout<<max; return 0; }


Run Info:

------Input------
2147483647
------Answer-----
8
------Your output-----
2