Advertisement
pacho_the_python

Untitled

Jan 20th, 2022
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. first_employee = int(input())
  2. second_employee = int(input())
  3. third_employee = int(input())
  4. number_of_students = int(input())
  5.  
  6. hours = 0
  7.  
  8. students_per_hour = first_employee + second_employee + third_employee
  9.  
  10. while number_of_students > 0:
  11.     hours += 1
  12.     if hours % 4 != 0:
  13.         number_of_students -= students_per_hour
  14.     if hours % 4 == 0:
  15.         pass
  16.  
  17.  
  18. print(f"Time needed: {hours}h.")
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement