Advertisement
Guest User

Untitled

a guest
Apr 5th, 2020
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. count_a = int(input())
  2. count_b = int(input())
  3. count_c = int(input())
  4. people_count = int(input())
  5.  
  6. hours = 0
  7. sum_per_hour = count_a + count_b + count_c
  8.  
  9. while people_count > 0:
  10.     hours += 1
  11.     people_count -= sum_per_hour
  12.     if hours % 4 == 0:
  13.         hours += 1
  14. print(f"Time needed: {hours}h.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement