走过路过,不要错过,耳屎(20)分求助
查看原帖
走过路过,不要错过,耳屎(20)分求助
1056929
leyitianzun楼主2023/12/22 19:41
#include<bits/stdc++.h>
using namespace std;
void e(int q,int w[100001],int r,int y,int i){
	if(r<q){
	cin>>w[r];
	i+=w[r];
	r++;
	
	}
	else{
		sort(w,w+q);
		cout<<i-w[r];
		return;
	}e(q,w,r,y,i);
}
int main(){
	int q,w[100001],r=0,y,i=0;
	cin>>q;
	e(q,w,r,y,i);
};
2023/12/22 19:41
加载中...