Advertisement
Josif_tepe

Untitled

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