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