Problem 191474 · easy · Phase 01 Prerequisites & Setup

Minutes Past Midnight

functions · integer division · modulo · f-strings

A timetable stores each departure as the number of minutes after midnight. Write clock(minutes) that returns the 24-hour time as a string HH:MM, with both parts zero-padded to two digits.

Examples

Input:  minutes = 75
Output: "01:15"
Input:  minutes = 1439
Output: "23:59"

Constraints

  • 0 <= minutes <= 1439

Goals

  • Convert a minute count into hours and minutes
  • Return a zero-padded HH:MM string
Starting Python…