Advertisement
bl00dt3ars

08. Party Profit

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