Problem 2658. Average speed for the entire trip

Created by Pritesh Shah in Community

The input is two speeds (for the trip and return trip) and output is average speed. Assume units are consistent, say miles per hour (MPH).

So, for example, a train travels at 60 MPH on a trip and at 100 MPH on return trip. What was its average speed for the entire trip?

Solution Stats

43.7% Correct | 56.3% Incorrect
Last solution submitted on Feb 19, 2019

Solution Comments