Advertisement
PythonNinja

Untitled

Feb 29th, 2020
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.52 KB | None | 0 0
  1. employee_one = int(input())  # efficiency
  2. employee_two = int(input())
  3. employee_three = int(input())
  4. people_count = int(input())
  5.  
  6. # employee_count = 3
  7. efficiency_sum = employee_one + employee_two + employee_three
  8. people = people_count
  9. hours = 0
  10. while True:
  11.     if people > efficiency_sum:
  12.         people -= efficiency_sum
  13.         hours += 1
  14.         if hours % 4 == 0:
  15.             hours += 1
  16.     else:
  17.         hours += 1
  18.         if hours % 4 == 0:
  19.             hours += 1
  20.         break
  21. print(f'Time needed: {hours}h.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement