Minutes to h:min
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fe8c248a3-2da7-4c1b-b7b0-3b645171857a%2Faws4_requestX-Amz-Date20220411T080047ZX-Amz-Expires86400X-Amz-Signatureb8dd42e8760d0ab532906ed885626fe987e415eff928f4c59f1991f6723b44d0X-Amz-SignedHeadershostx-idGetObject.png?table=block&id=248c0fb0-bdcd-409c-9802-054a55330072&cache=v2)
Given the minutes passed since midnight
00:00
, print what time it is in the format hour:minute
.Input | Output |
1048 | 17:28 |
2096 | 10:56 |
Note that the input can contain minutes that are larger than 24 hours, but the output needs to always be in the range
0:0 - 23:59
.Hint
You can use the remainder operator
%
to make sure the values for hours and minutes stay in the appropriate rangeConstraints
Time limit: 2 seconds
Memory limit: 512 MB
Output limit: 1 MB