Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 02. Hospital
- period = int(input())
- doctors = 7
- treated_sum = 0
- untreated_sum = 0
- for i in range(1, period + 1):
- patients = int(input())
- if i % 3 == 0 and untreated_sum > treated_sum:
- doctors += 1
- if patients > doctors:
- untreated_sum += (patients - doctors)
- patients = doctors
- treated_sum += patients
- print(f"Treated patients: {treated_sum}.")
- print(f"Untreated patients: {untreated_sum}.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement