Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
120662 | 丁海扬 | 22不与最大数相同的数字之和 | C++ | Compile Error | 0 MS | 0 KB | 260 | 2025-05-31 09:42:51 |
#include<bits/stdc++.h> using namespace std; int main() { int a[1001],maxn=0,sum=0,m; cin>>m; for(int i=1;i<=m;i++) { cin>>a[i]; sum+=a[i]; } for(int i=1;i<=m;i++) { if(a[i]>min) maxn=a[i]; } cout<<sum-maxn; return 0; }
Main.cc: In function 'int main()': Main.cc:14:11: error: invalid operands of types 'int' and '' to binary 'operator>' if(a[i]>min) ^