C++版 AC代码
查看原帖
C++版 AC代码
1495916
wangjiahao1楼主2024/11/19 22:00
#include<bits/stdc++.h>
using namespace std;
long long a,b,c,d;
int main(){
	cin >> a >> b >> c >> d;
	if(d >= a * 2 + b * 5 + c * 3){
		cout << "Yes\n"; 
		cout << d - ( a * 2 + b * 5 + c * 3 );
	}
	else{
		cout << "No\n";
		cout << abs(d-(a*2+b*5+c*3));
	}
	return 0;
}

~~ 求关~~

2024/11/19 22:00
加载中...