dxnge

Task 6

Sep 16th, 2021
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. a = input()
  2. b = input().split()
  3. b = list(map(int, b))
  4. aH = int(a[0]+a[1])
  5. aM = int(a[3]+a[4])
  6. xH = aH + int(b[0])
  7. xM = aM + int(b[1])
  8. if xM > 59:
  9.     xM = xM - 60
  10.     xH = xH + 1
  11. if xH > 23:
  12.     xH = xH % 24
  13. if len(str(xH))< 2:
  14.     xH = ('0' + str(xH))
  15. if len(str(xM))< 2:
  16.     xM = '0' + str(xM)
  17. print(str(xH) + ':' + str(xM))
Advertisement
Add Comment
Please, Sign In to add comment