Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- num_location = int(input())
- average_gold_for_day = 0
- total_gold = 0
- for location in range(1,num_location + 1):
- average_gold_about_day = float(input())
- num_days_in_that_location = int(input())
- average_gold_for_day = 0
- for day in range(1,num_days_in_that_location + 1):
- gold_for_day = float(input())
- average_gold_for_day += gold_for_day
- total_gold = average_gold_for_day / day
- if total_gold >= average_gold_about_day:
- print(f"Good job! Average gold per day: {total_gold:.2f}.")
- else:
- print(f"You need {abs(average_gold_about_day - total_gold):.2f} gold.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement