HUST Online Judge WebBoard
[ New Thread ]
Problem 1 >> 1
2020zjdl42 @ 2021-11-20 15:52:19
[ Quote ] [ Edit ] [ Delete ] 1#
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,x,y,c;
cin>>a>>b>>x>>y;
if(x<y and a<b){
cout<<"Impossible";
return 0;
}
if(a>=b){
cout<<0;
}else{
c=(b-a)/(x-y)+1;
cout<<c;
}

return 0;
}
[Top] [Previous Page] [Next Page]