Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- long long int n,m,e,b;
- cin>>n>>m>>e>>b;
- long long int B=(m*b+e)/(m-n);
- long long int E=n*B+e;
- cout<<E<<'\n'<<B<<'\n';
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement