Advertisement
tod36

01. Softuni reception mid exam 05 07 2020

Jul 5th, 2020
731
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. employer_1 = int(input())
  2. employer_2 = int(input())
  3. employer_3 = int(input())
  4. count_of_students = int(input())
  5. time_needed = 0
  6. counter = 0
  7. student_per_hour = int(employer_1 + employer_2 + employer_3)
  8. while count_of_students > 0:
  9.     count_of_students -= student_per_hour
  10.     time_needed += 1
  11.     if (time_needed - counter) % 3 == 0:
  12.         time_needed += 1
  13.         counter += 1
  14. print(f'Time needed: {time_needed}h.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement