Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- time_period = int(input())
- current_doctors = 7
- days = 1 # на 2-рия ден days = 3
- done_patients = 0
- un_patients = 0
- un_treated = 0
- for x in range(1, time_period + 1):
- count_patients = int(input())
- days += 1
- if current_doctors < count_patients:
- done_patients = done_patients + current_doctors
- un_patients = count_patients - current_doctors
- un_treated += un_patients
- elif current_doctors >= count_patients:
- done_patients = done_patients + count_patients
- if not days % 3: # на 2-рия ден days = 3
- if un_treated > done_patients:
- current_doctors += 1
- print(f'Treated patients: {done_patients}.')
- print(f'Untreated patients: {un_treated}.')
Add Comment
Please, Sign In to add comment