Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = input()
- b = input().split()
- b = list(map(int, b))
- aH = int(a[0]+a[1])
- aM = int(a[3]+a[4])
- xH = aH + int(b[0])
- xM = aM + int(b[1])
- if xM > 59:
- xM = xM - 60
- xH = xH + 1
- if xH > 23:
- xH = xH % 24
- if len(str(xH))< 2:
- xH = ('0' + str(xH))
- if len(str(xM))< 2:
- xM = '0' + str(xM)
- print(str(xH) + ':' + str(xM))
Advertisement
Add Comment
Please, Sign In to add comment