Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <vector>
- #include <queue>
- using namespace std;
- int main()
- {
- int n, a, r, b;
- cin >> n >> a >> r >> b;
- int kupeni_vo_prvata = (n / a);
- n -= kupeni_vo_prvata * a;
- n += kupeni_vo_prvata * r;
- int kupeni_vo_vtorata = (n / b);
- if(kupeni_vo_vtorata > kupeni_vo_prvata) {
- cout << "DA" << endl;
- }
- else {
- cout << "NE" << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement