Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
2770 | 吴奕希 | 字符串中最大的数字II | C++ | Accepted | 0 MS | 264 KB | 253 | 2024-01-28 21:54:24 |
# include<iostream> using namespace std; int main(){ char a[1000]; int l = 0, _max = 0; cin>>a; while(a[l]!='\0')l++; for(int i = 0; i < l; i++)if(a[i]!='.'&&(int)(a[i])-48>_max)_max=a[i]-48; cout<<_max; return 0; }