Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
134871 鲁博睿 字符串中最大的数字II C++ Accepted 1 MS 272 KB 272 2025-11-01 16:51:55

Tests(10/10):


Code:

#include <bits/stdc++.h> using namespace std; char s[1005]; int main() { cin>>s; char max='0'; double len=strlen(s); for(int i=0;i<len;i++){ if(s[i]>='0' && s[i]<='9'){ if(s[i]>max){ max = s[i]; } } } cout<<max<<endl; return 0; }