Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. days_plunder = int(input())
  2. daily_plunder = int(input())
  3. expected_plunder = float(input())
  4. d = 0
  5.  
  6. for i in range(1, days_plunder+1):
  7.     if i % 5 == 0:
  8.         d -= d * 0.3
  9.         continue
  10.     if i % 3 == 0:
  11.         d += (daily_plunder * 1.5) + daily_plunder
  12.         continue
  13.     d += daily_plunder
  14.  
  15. if d >= expected_plunder:
  16.     print(f'Ahoy! {d:.2f} plunder gained.')
  17. else:
  18.     print(f'Collected only {(d * 100) / expected_plunder:.2f}% of the plunder.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement