Advertisement
Spocoman

01. SoftUni Reception

Nov 8th, 2023
470
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. first = int(input())
  2. second = int(input())
  3. third = int(input())
  4. students = int(input())
  5.  
  6. counter = 1
  7. hours = 0
  8.  
  9. while students > 0:
  10.     students -= first + second + third
  11.     hours += (2 if counter % 3 == 0 and students > 0 else 1)
  12.     counter += 1
  13.  
  14. print(f"Time needed: {hours}h.")
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement