Company: accenture_25thjuly
Difficulty: easy
A financial analytics team maintains a log of currency exchange rate observations. Each observation records a currency pair, the exchange rate that was quoted, and the date on which it was quoted. The same currency pair may be observed on many different dates, and several unrelated pairs are stored together in the same log. The analysts want to study one particular currency pair over one particular window of time. Given the log, a target currency pair and an inclusive date range, report the average of the rates that belong to that pair and were quoted on a date inside the range. An observation is taken into account only if both conditions hold: its currency pair is exactly equal to the target pair (comparison is case-sensitive, character by character), and its date d satisfies startDate <= d <= endDate (both endpoints are included). The answer is the arithmetic mean of the rates of all accounted observations, rounded to exactly two digits after the decimal point. Input Format The