Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
102712 李禹宸 字符串中最大的数字II C++ Accepted 1 MS 276 KB 242 2024-12-22 14:51:22

Tests(10/10):


Code:

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