Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
155855 王晏林 字符串中最大的数字II C++ Accepted 1 MS 284 KB 268 2026-06-14 10:56:15

Tests(10/10):


Code:

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