Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- quantity = int(input())
- days = int(input())
- cost = 0
- Christmas_spirit = 0
- day_count = 1
- while day_count < days:
- if day_count % 2 == 0:
- cost += quantity * 2
- Christmas_spirit += 5
- if day_count % 3 == 0:
- cost += (quantity * 5) + (quantity * 3)
- Christmas_spirit += 13
- if day_count % 5 == 0:
- cost += quantity * 15
- Christmas_spirit += 17
- if day_count % 15 == 5 and days % 15 == 3:
- Christmas_spirit += 30
- if day_count % 10 == 0:
- cost += 23
- Christmas_spirit -= 20
- if day_count % 11 == 0:
- quantity += 2
- day_count += 1
- if days == 10:
- Christmas_spirit -= 30
- print(f"Total cost: {cost}")
- print(f"Total spirit: {Christmas_spirit}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement