09. On Time for the Exam - Python
https://pastebin.com/F2skT5BG
If you put this Input:
11
30
12
29
Expected output
late 59 minutes after the start
My output
late 1 01 hours after the start
and I really can't understand why...
https://pastebin.com/F2skT5BG
If you put this Input:
11
30
12
29
Expected output
late 59 minutes after the start
My output
late 1 01 hours after the start
and I really can't understand why...
Боби, трябва да направиш abs(diff) // 60 и abs(diff) % 60 (затваряш скобата веднага след diff) защото при отрицателни аргументи имаш:
$ python
>>> -59 // 60
-1
>>> -59 % 60
1
а при положителни:
>>> 59 // 60
0
>>> 59 % 60
59