Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
120802 | 张铖睿 | 22不与最大数相同的数字之和 | C++ | Compile Error | 0 MS | 0 KB | 279 | 2025-06-01 08:57:47 |
#include<bits/stdc++.h> using namespace std; int main() { int a[101],n,sum=0,max=1; cin>>n for(int i=1;i<=n;i++) { cin>>a[i]; sum+=a[i]; if(a[i]<max) max=a[i]; } for(int i=1;i<=n;i++) if(a[i]<max) s++; cout<<sum-max*s; return 0; }
Main.cc: In function 'int main()': Main.cc:7:2: error: expected ';' before 'for' for(int i=1;i<=n;i++) ^ Main.cc:7:14: error: 'i' was not declared in this scope for(int i=1;i<=n;i++) ^ Main.cc:16:3: error: 's' was not declared in this scope s++; ^ Main.cc:18:16: error: 's' was not declared in this scope cout<