50分求调(样例都过了)
查看原帖
50分求调(样例都过了)
1747186
wddyg楼主2025/8/3 08:28
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int q,b,z,money;
	cin>>q>>b>>z>>money;
	int l=2*q+5*b+3*z;
	if(l>money) cout<<"No"<<endl<<money;
	else cout<<"Yes"<<endl<<money-l;
}
2025/8/3 08:28
加载中...