Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- quanity = int(input())
- days_left = int(input())
- Ornament_Set = 2
- Tree_Skirt = 5
- Tree_Garlands = 3
- Tree_Lights = 15
- day = 0
- christmas_spirit = 0
- total_price = 0
- for k in range (1, days_left +1):
- day += 1
- if day % 11 == 0:
- quanity += 2
- if day % 15 == 0:
- christmas_spirit += 30
- if k == days_left:
- if days_left % 10 == 0:
- christmas_spirit -= 30
- if day % 2 == 0:
- total_price += Ornament_Set * quanity
- christmas_spirit += 5
- if day % 3 == 0:
- total_price += (Tree_Skirt * quanity) + (Tree_Garlands * quanity)
- christmas_spirit += 13
- if day % 5 == 0:
- total_price += Tree_Lights * quanity
- christmas_spirit += 17
- if day % 10 == 0:
- christmas_spirit -= 20
- total_price += Tree_Skirt + Tree_Garlands + Tree_Lights
- print(f"Total cost: {total_price}")
- print(f"Total spirit: {christmas_spirit}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement