Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
157631 丁陆永新 字符串中最大的数字 C++ Accepted 1 MS 280 KB 267 2026-08-08 10:58:44

Tests(10/10):


Code:

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