Run ID:121556

提交时间:2025-06-07 16:47:23

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n1[100]={0}; int n,max1=0,a1=0; cin>>n; for(int w=0;w<n;w++){ cin>>n1[w]; max1=n1[0]; } for(int w=0;w<n;w++){ if(max1<n1[w]) max1=n1[w]; } for(int w=0;w<n;w++){ if(n1[w]!=max1) a1+=n1[w]; } cout<<a1<<endl; return 0; }