Advertisement
Josif_tepe

Untitled

Feb 14th, 2021
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #include <stack>
  4. #include <queue>
  5. #include <algorithm>
  6. using namespace std;
  7. int main()
  8.     {
  9.         ios_base::sync_with_stdio(false);
  10.         int k, a, b;
  11.         cin >> k >> a >> b;
  12.         if(b == a) {
  13.             cout << "NE" << endl;
  14.             return 0;
  15.         }
  16.         if(k % (b - a) == 0) {
  17.             cout << k / (b - a) << endl;
  18.         }
  19.         else {
  20.             cout << "NE" << endl;
  21.         }
  22.         return 0;
  23.     }
  24. // ({})
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement