T4
2025-07-27 22:03:44
发布于:上海
26阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d,k,sum=0,n=0;
cin>>a>>b>>c>>d>>k;
while(k!=0){
if(d!=0)sum+=4,d--,k--;
else if(c!=0)sum+=3,c--,k--;
else if(b!=0)sum+=2,b--,k--;
else if(a!=0)sum+=1,a--,k--;
}cout<<sum;
return 0;
}
这里空空如也
有帮助,赞一个