Advertisement
Josif_tepe

Untitled

Mar 1st, 2021
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <vector>
  4. #include <queue>
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     int n, a, r, b;
  10.     cin >> n >> a >> r >> b;
  11.     int kupeni_vo_prvata = (n / a);
  12.     n -= kupeni_vo_prvata * a;
  13.     n += kupeni_vo_prvata * r;
  14.     int kupeni_vo_vtorata = (n / b);
  15.     if(kupeni_vo_vtorata > kupeni_vo_prvata) {
  16.         cout << "DA" << endl;
  17.     }
  18.     else {
  19.         cout << "NE" << endl;
  20.     }
  21.     return 0;
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement