Advertisement
Guest User

Untitled

a guest
Dec 17th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. int main()
  2. {
  3.     int a, b, c;
  4.     cin >> a >> b >> c;
  5.     if(a - min(a, c, b/2) == 0)
  6.       cout << 4 * min(a, c, b/2);
  7.     else
  8.     if(b - 2 * min(a, c, b/2) == 0)
  9.       cout << 1 + 4 * min(a, c, b/2);
  10.     else
  11.     if(c - min(a, c, b/2) == 0)
  12.       cout << 2 + 4 * min(a, c, b/2);
  13.     else
  14.       cout << 3 + 4 * min(a, c, b/2);
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement