Problem 199804 · easy · Phase 01 Prerequisites & Setup

Road Trip Duration

input · arithmetic · rounding · integer division · modulo

Read a distance in kilometres and an average speed in km/h (both may be decimals). Work out how long the trip takes, round it to the nearest whole minute, and print it as <h> h <m> min.

Examples

Input:
150
60
Output:
2 h 30 min
Input:
100
80
Output:
1 h 15 min

Constraints

  • 0 <= distance <= 100000, 1 <= speed <= 1000

Goals

  • Compute a travel time from distance and speed
  • Convert a fractional number of hours into hours and minutes
  • Round to the nearest whole minute
Starting Python…