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