Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
124990 | 罗锦墨 | 字符串中最大的数字 | C++ | Compile Error | 0 MS | 0 KB | 194 | 2025-07-13 09:29:44 |
#include<bits/stdc++.h> using namespace std long long n; cin>>n; int max=0; if(n<0){ n = -1*n; } while(n>0){ (max<n%10){ } n =n/10 } cout<<max; return 0; }
Main.cc:3:1: error: expected ';' before 'long' long long n; ^ Main.cc:4:1: error: 'cin' does not name a type cin>>n; ^ Main.cc:6:2: error: expected unqualified-id before 'if' if(n<0){ ^ Main.cc:9:2: error: expected unqualified-id before 'while' while(n>0){ ^