csc-python-solutions/08/5 - Ending Time.py

12 lines
174 B
Python
Raw Permalink Normal View History

2021-02-18 09:37:07 +00:00
t = input()
D = int(input())
h = int(t[:2])
m = int(t[3:])
m += D
h += m//60
m = str(m%60)
m = "0" * (2-len(m)) + m
h = str(h%24)
h = "0" * (2-len(h)) + h
print(h + ":" + m)