为何0分,求调
查看原帖
为何0分,求调
757326
KanaAqua_qwq楼主2024/10/7 09:01
#include<bits/stdc++.h>
using namespace std;
int q;
int aa,aaa,aaaa,bbbb,bbbbbb;
int tot;
int main() {
	cin>>q;
	while(q--) {
		cin>>aa>>aaa>>aaaa>>bbbb>>bbbbbb;
		while(bbbbbb&&aaa) { 
			bbbbbb--;
			aaa--;
			tot+=3;
		}
		while(bbbbbb&&aaaa) {
			bbbbbb--;
			aaaa--;
			tot+=4;
		}while(bbbb&&aa) {
			bbbb--;
			aa--;
			tot+=2;
		}
		while(bbbb&&aaa) {
			bbbb--;
			aaa--;
			tot+=3;
		}
		while(bbbb&&aaaa) {
			bbbb--;
			aaaa--;
			tot+=4;
		}
		while(bbbbbb&&aa) {
			bbbbbb--;
			aa--;
			tot+=2;
		}
		cout<<tot<<endl;
		tot=0;
	}
	
	
	return 0;
}
2024/10/7 09:01
加载中...