Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- number_of_locations = int(input())
- for location in range(number_of_locations):
- expected_average_income = float(input())
- days_for_current_location = int(input())
- current_income = 0
- for days in range(days_for_current_location):
- daily_income = float(input())
- current_income += daily_income
- real_average_income = current_income / days_for_current_location
- if real_average_income >= expected_average_income:
- print(f"Good job! Average gold per day: {real_average_income:.2f}.")
- else:
- final_result = expected_average_income - real_average_income
- print(f"You need {final_result:.2f} gold.")
Advertisement
Add Comment
Please, Sign In to add comment