WA#9 求调
查看原帖
WA#9 求调
744858
GalaxyDeepLove楼主2024/7/24 12:47
#include <bits/stdc++.h>
using namespace std;

int x, y, z, w;
int main() {
	cin >> x >> y >> z >> w;
	if(z != 0){
		if((x / z) * w == y) cout << x / z << endl;
		else cout << -1 << endl;
	}	
	else if(w == 0) cout << -1 << endl;
	else cout << y / w << endl;
	return 0;
}

帮个忙吧,谢谢。

2024/7/24 12:47
加载中...