Advertisement
Josif_tepe

Untitled

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