Advertisement
rengetsu

KVALIF_VGTU_A

Mar 17th, 2020
106
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. using namespace std;
  3. int main()
  4. {
  5.     int x, y, z, maxx = 0;
  6.     cin >> x >> y >> z;
  7.     if(x!=0 && x!=1){maxx=x/2;}
  8.     else{maxx=-1;}
  9.     if(y>=6 && maxx!=-1){if( (y/6)<maxx ){maxx=y/6;}}
  10.     else{maxx=-1;}
  11.     if(z>=1 && maxx!=-1){if( (z/1)<maxx ){maxx=z/1;}}
  12.     else{maxx=-1;}
  13.    
  14.     if(maxx==-1){cout << "0";}
  15.     else{cout << maxx;}
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement