Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
111837 张智博 字符串中最大的数字 C++ Wrong Answer 1 MS 272 KB 285 2025-03-06 22:30:28

Tests(4/10):


Code:

#include <iostream> using namespace std; int main() { int N; cin >> N; int m = 0; while (N != 0) { int a = N % 10; if (a > m) { m = a; } N /= 10; } cout << m << endl; return 0; }


Run Info:

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