Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- quantity_decorations = int(input())
- days_christmas = int(input())
- ornaments_cost, skirt_cost, garland_cost, lights_cost = 2, 5, 3, 15
- ornaments_points, skirt_points, garland_points, lights_points = 5, 3, 10, 17
- shopping_day = 0
- decoration_cost, christmas_spirit = 0, 0
- while days_christmas > 0:
- days_christmas -= 1
- shopping_day += 1
- if shopping_day % 2 == 0:
- christmas_spirit += 5
- decoration_cost += 2
- if shopping_day % 11 == 0:
- decoration_cost += 2
- if shopping_day % 3 == 0:
- christmas_spirit += 43
- decoration_cost += 8
- if shopping_day % 11 == 0:
- decoration_cost += 8
- if shopping_day % 5 == 0:
- christmas_spirit += 17
- decoration_cost += 15
- if shopping_day % 11 == 0:
- decoration_cost += 15
- if shopping_day % 10 == 0:
- christmas_spirit -= 20
- shopping_day -= 1
- if shopping_day == 10 and days_christmas == 10:
- christmas_spirit -= 30
- print(f'Total cost: {decoration_cost}\nTotal spirit: {christmas_spirit}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement