Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. days = int(input())
  2. total_treated = 0
  3. total_untreated = 0
  4. treated = 0
  5. untreated = 0
  6. docs = 7
  7.  
  8. for i in range(1, days+1):
  9.     if i % 3 == 0:
  10.         if total_untreated > total_treated:
  11.             docs += 1
  12.  
  13.     patients = int(input())
  14.  
  15.     if patients <= docs:
  16.         treated = patients
  17.         untreated = 0
  18.     else:
  19.         treated = docs
  20.         untreated = (patients-docs)
  21.  
  22.     total_treated += treated
  23.     total_untreated += untreated
  24.  
  25. print(f'Treated patients: {total_treated}.')
  26. print(f'Untreated patients: {total_untreated}.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement