Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
124969 陈华仁星 字符串中最大的数字 C++ Wrong Answer 1 MS 196 KB 205 2025-07-13 09:15:26

Tests(4/10):


Code:

#include <cstdio> #include <cstring> using namespace std; int main() { int n,num=0; scanf("%d",&n); while(n!=0) { if(n%10>num) num=n%10; n/=10; } printf("%d",num); return 0; }


Run Info:

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