Advertisement
Spocoman

08. Party Profit

Jan 19th, 2022
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. party = int(input())
  2. days = int(input())
  3. coins = 0
  4. for i in range(1, days + 1):
  5.     if i % 15 == 0:
  6.         party += 5
  7.     if i % 10 == 0:
  8.         party -= 2
  9.     if i % 5 == 0:
  10.         coins += party * 20
  11.         if i % 3 == 0:
  12.             coins -= party * 2
  13.     if i % 3 == 0:
  14.         coins -= party * 3
  15.     coins += 50 - party * 2
  16. print(f'{party} companions received {int(coins / party)} coins each.')
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement