Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- locations = int(input())
- for place in range(1, locations + 1):
- expected = float(input())
- days = int(input())
- count = 0
- for x in range(1, days + 1):
- gold_per_day = float(input())
- count += gold_per_day
- average_per_location = count / days
- if average_per_location >= expected:
- print(f"Good job! Average gold per day: {average_per_location:.2f}.")
- if average_per_location < expected:
- difference = expected - average_per_location
- print(f"You need {difference:.2f} gold.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement