Advertisement
a53

EleviSiBanci

a53
Feb 1st, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. long long int n,m,e,b;
  7. cin>>n>>m>>e>>b;
  8. long long int B=(m*b+e)/(m-n);
  9. long long int E=n*B+e;
  10. cout<<E<<'\n'<<B<<'\n';
  11. return 0;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement