Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- days_plunder = int(input())
- daily_plunder = int(input())
- expected_plunder = float(input())
- d = 0
- for i in range(1, days_plunder+1):
- if i % 5 == 0:
- d -= d * 0.3
- continue
- if i % 3 == 0:
- d += (daily_plunder * 1.5) + daily_plunder
- continue
- d += daily_plunder
- if d >= expected_plunder:
- print(f'Ahoy! {d:.2f} plunder gained.')
- else:
- print(f'Collected only {(d * 100) / expected_plunder:.2f}% of the plunder.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement