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