Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- companions = int(input())
- days = int(input())
- coins = 0
- coins_for_food = companions * 2
- coins_for_party = companions * 3
- coins_from_boss = companions * 20
- for day in range(1, days + 1):
- if day % 10 == 0:
- companions -= 2
- if day % 15 == 0:
- companions += 5
- coins += 50 - coins_for_food
- if day % 3 == 0:
- coins -= coins_for_party
- if day % 5 == 0:
- coins += coins_from_boss
- if day % 3 == 0:
- coins -= coins_for_food
- coins_per_companion = coins // companions
- print(f"{companions} companions received {coins_per_companion} coins each.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement