Advertisement
fumanbest

Christmas Spirit

Jan 21st, 2020
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.90 KB | None | 0 0
  1. quantity = int(input())
  2. day = int(input())
  3. count_days = 0
  4. total_price = 0
  5. total_spirit = 0
  6. Ornament_Set = 2
  7. Tree_Skirt = 5
  8. Tree_Garlands = 3
  9. Tree_Lights = 15
  10. for i in range(day):
  11.     count_days += 1
  12.     if count_days % 11 == 0:
  13.         quantity += 2
  14.     if count_days % 2 == 0:
  15.         total_price += Ornament_Set * quantity
  16.         total_spirit += 5
  17.     if count_days % 3 == 0:
  18.         total_price += (Tree_Skirt + Tree_Garlands) * quantity
  19.         total_spirit += 13
  20.     if count_days % 5 == 0:
  21.         total_price += Tree_Lights * quantity
  22.         total_spirit += 17
  23.     if count_days % 5 == 0 and count_days % 3 == 0:
  24.         total_spirit += 30
  25.     if count_days % 10 == 0:
  26.         total_spirit -= 20
  27.         total_price += Tree_Skirt + Tree_Garlands + Tree_Lights
  28. if day % 10 == 0:
  29.     total_spirit -= 30
  30.  
  31. print(f"Total cost: {total_price}")
  32. print(f"Total spirit: {total_spirit}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement