Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- number_of_locations = int(input())
- for each_location in range(number_of_locations):
- expected_average_gold_per_day = float(input())
- days_of_work = int(input())
- total_gold_for_each_location = 0
- for each_day in range(days_of_work):
- daily_gold = float(input())
- total_gold_for_each_location += daily_gold
- average_gold_per_location = total_gold_for_each_location / days_of_work
- if average_gold_per_location >= expected_average_gold_per_day:
- print(f"Good job! Average gold per day: {average_gold_per_location:.2f}.")
- else:
- print(f"You need {expected_average_gold_per_day - average_gold_per_location:.2f} gold.")
Advertisement
Add Comment
Please, Sign In to add comment