Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- number_of_decoration = int(input())
- days = int(input())
- christmas_spirit = 0
- total = 0
- multipliers = {
- 2: (2, 5),
- 3: (8, 13),
- 5: (15, 17),
- 10: (23, -20)
- }
- for day in range(1, days + 1):
- if day % 11 == 0:
- number_of_decoration += 2
- if day in multipliers:
- multiplier_cost, multiplier_spirit = multipliers[day]
- total += number_of_decoration * multiplier_cost
- christmas_spirit += multiplier_spirit
- if day % 3 == 0 and day % 5 == 0:
- christmas_spirit += 30
- if day % 10 == 0:
- christmas_spirit -= 30
- print(f"Total cost: {total}")
- print(f"Total spirit: {christmas_spirit}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement