Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
124972 | 陈华仁星 | 字符串中最大的数字 | C++ | Wrong Answer | 1 MS | 196 KB | 220 | 2025-07-13 09:16:54 |
#include <cstdio> #include <cstring> using namespace std; int main() { long long n; int num=0; scanf("%lld",&n); while(n!=0) { if(n%10>num) num=n%10; n/=10; } printf("%d",num); return 0; }
------Input------
-987654321
------Answer-----
9
------Your output-----
0