Advertisement
bl00dt3ars

08. Party Profit (Радо Хаджиев)

May 28th, 2021
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. party_size = int(input())
  2. days = int(input())
  3. day = 0
  4. coins = 0
  5. coin_per_comp = 0
  6.  
  7. for day in range(days):
  8.     day += 1
  9.     coins += 50
  10.     if day % 10 == 0:
  11.         party_size -= 2
  12.     if day % 15 == 0:
  13.         party_size += 5
  14.     coins -= party_size * 2
  15.     if day % 3 == 0:
  16.         coins -= party_size * 3
  17.     if day % 5 == 0:
  18.         coins += party_size * 20
  19.         if day % 3 == 0:
  20.             coins -= party_size * 2
  21.  
  22. coin_per_comp = coins // party_size
  23.  
  24. print(f"{party_size} companions received {coin_per_comp} coins each.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement