Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
773 | 邓小龙 | 22不与最大数相同的数字之和 | C++ | Wrong Answer | 0 MS | 264 KB | 312 | 2023-04-01 15:15:35 |
# include<iostream> using namespace std; int main(){ int n,a[101]={},sum=0,max=-1000001; cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; sum+=a[i]; if(max<a[i]) max=a[i]; //cout<<i<<" "<<sum<<" "<<max<<endl; } cout<<sum-max; return 0; }
------Input------
79 60 9 71 77 12 97 18 10 15 12 82 28 1 16 43 53 40 58 40 23 74 65 19 55 31 23 84 82 0 98 24 57 20 45 73 72 90 64 44 7 67 33 98 75 69 69 49 82 56 90 64 57 77 78 75 90 20 36 14 63 26 57 8 25 90 26 48 56 95 0 17 22 43 69 37 98 23 37 37
------Answer-----
3574
------Your output-----
3770