90分,求调
查看原帖
90分,求调
1273257
he_hui楼主2024/8/15 11:30
#include<bits/stdc++.h>
#define long long
using namespace std;
int x,y,z,w;

int main(){
	cin>>x>>y>>z>>w;
	if(x==0&&z==0){
		cout<<y/w;
		return 0;
	}
	int c=x/z;
	
	if(c*w==y) cout<<c;
	else cout<<-1;
		 
	
	return 0;
}
2024/8/15 11:30
加载中...