Advertisement
Guest User

Untitled

a guest
Jan 19th, 2020
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. quanity = int(input())
  2. days_left = int(input())
  3.  
  4. Ornament_Set = 2
  5. Tree_Skirt = 5
  6. Tree_Garlands = 3
  7. Tree_Lights = 15
  8.  
  9. day = 0
  10. christmas_spirit = 0
  11. total_price = 0
  12.  
  13. for k in range (1, days_left +1):
  14. day += 1
  15.  
  16. if day % 11 == 0:
  17. quanity += 2
  18.  
  19. if day % 15 == 0:
  20. christmas_spirit += 30
  21.  
  22. if k == days_left:
  23. if days_left % 10 == 0:
  24. christmas_spirit -= 30
  25.  
  26. if day % 2 == 0:
  27. total_price += Ornament_Set * quanity
  28. christmas_spirit += 5
  29. if day % 3 == 0:
  30. total_price += (Tree_Skirt * quanity) + (Tree_Garlands * quanity)
  31. christmas_spirit += 13
  32. if day % 5 == 0:
  33. total_price += Tree_Lights * quanity
  34. christmas_spirit += 17
  35. if day % 10 == 0:
  36. christmas_spirit -= 20
  37. total_price += Tree_Skirt + Tree_Garlands + Tree_Lights
  38.  
  39.  
  40.  
  41. print(f"Total cost: {total_price}")
  42. print(f"Total spirit: {christmas_spirit}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement