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