Problem 168721 · easy · Phase 01 Prerequisites & Setup

Days, Hours and Minutes

functions · integer division · modulo · tuples

A server reports its uptime as a total number of minutes. Write uptime(minutes) that returns a tuple (days, hours, mins) where hours is less than 24 and mins is less than 60.

Examples

Input:  minutes = 1565
Output: (1, 2, 5)
Input:  minutes = 59
Output: (0, 0, 59)

Constraints

  • 0 <= minutes <= 10**9

Goals

  • Break a minute count into days, hours and minutes
  • Return several values as a tuple
Starting Python…