mfgnik

Untitled

May 27th, 2020
924
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. def get_remain_time(a, b, c):
  2.     if a == 0:
  3.         return 0
  4.     if b == 0:
  5.         return 1
  6.     if c == 0:
  7.         return 2
  8.     return 3
  9.  
  10.  
  11. a, b, c = [int(input()) for _ in range(3)]
  12. round_time = min(a, b, c // 2)
  13. a -= round_time
  14. b -= round_time * 2
  15. c -= round_time
  16. print(round_time * 4 + get_remain_time(a, b, c))
Advertisement
Add Comment
Please, Sign In to add comment