Advertisement
ALEXANDAR_GEORGIEV

christmas_spirit

Oct 23rd, 2022
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. quantity_decorations = int(input())
  2. remaining_days = int(input())
  3. budget = 0
  4. ornament_set = 2
  5. tree_skirt = 5
  6. tree_garland = 3
  7. tree_lights = 15
  8. total_spirit = 0
  9.  
  10. for current_day in range(1, remaining_days+1):
  11. if current_day % 11 == 0:
  12. quantity_decorations += 2
  13. if current_day % 2 == 0:
  14. budget += ornament_set * quantity_decorations
  15. total_spirit += 5
  16. if current_day % 3 == 0:
  17. budget += (tree_skirt + tree_garland) * quantity_decorations
  18. total_spirit += 13
  19. if current_day % 5 == 0:
  20. budget += tree_lights * quantity_decorations
  21. total_spirit += 17
  22. if current_day % 3 == 0:
  23. total_spirit += 30
  24. if current_day % 10 == 0:
  25. total_spirit -= 20
  26. budget += tree_skirt + tree_garland + tree_lights
  27.  
  28. if remaining_days % 10 == 0:
  29. total_spirit -= 30
  30.  
  31.  
  32. print(f'Total cost: {budget}')
  33. print(f'Total spirit: {total_spirit}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement