Advertisement
Josif_tepe

Untitled

Feb 15th, 2021
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.     int K, A, B;
  6.     cin >> K >> A >> B;
  7.     if(B == A) {
  8.         cout << "NE" << endl;
  9.         return 0;
  10.     }
  11.     if(K % (B - A) == 0) {
  12.         cout << K / (B - A) << endl;
  13.     }
  14.     else {
  15.         cout << "NE" << endl;
  16.     }
  17.     return 0;
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement