Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
98347 Kevin 字符串中最大的数字 C++ Wrong Answer 1 MS 272 KB 231 2024-11-19 16:16:54

Tests(4/10):


Code:

#include<bits/stdc++.h> #include<cstdio> #include<cstring> using namespace std; int main(){ int n,max=0,wei; cin>>n; while(n){ wei=n%10; if(wei>max) max=wei; n/=10; } cout<<char(max+'0'); return 0; }


Run Info:

------Input------
-987654321
------Answer-----
9
------Your output-----
0