Problem 186470 · easy · Phase 01 Prerequisites & Setup

Hours, Minutes, Seconds

functions · integer division · tuples

A stopwatch records a total number of seconds. Write split_seconds(total) that returns a tuple (hours, minutes, seconds) with minutes and seconds each below 60. Hours may be any size.

Examples

Input:  total = 3661
Output: (1, 1, 1)

Input:  total = 59
Output: (0, 0, 59)

Input:  total = 86400
Output: (24, 0, 0)

Constraints

  • 0 <= total <= 10**9

Goals

  • Return three values as a tuple
  • Convert a total into mixed units with `//` and `%`
Starting Python…