Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
7488 邓小龙 字符串中最大的数字 C++ Accepted 0 MS 264 KB 282 2025-05-02 23:39:22

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ char s[15],_max='0'; cin>>s; for(int i=0;i<strlen(s);i++){ if(s[i]=='-')continue; else{ _max=max(_max,s[i]); } } cout<<_max<<endl; return 0; }