Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
146621 李折曦 字符串中最大的数字 C++ Wrong Answer 0 MS 272 KB 196 2026-01-29 14:34:45

Tests(0/10):


Code:

#include <bits/stdc++.h> using namespace std; int main (){ char n[12]; cin>>n; int m=0; int i=0; while(n[i]!='\0'){ if(n[i]>m)m=n[i]-'0'; i++; } cout<<m; return 0; }


Run Info:

------Input------
2147483647
------Answer-----
8
------Your output-----
7