Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
7522 詹梓涵 字符串中最大的数字 C++ Wrong Answer 0 MS 264 KB 482 2025-05-03 10:20:26

Tests(0/10):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ char n[11]={},z=0; cin>>n[11]; for(int i=0;i<=strlen(n);i++){ if(n[i]=='-'){ continue; } else{ z=max(z,n[i]); } } cout<<z<<endl; return 0; }


Run Info:

------Input------
0
------Answer-----
0
------Your output-----