Advertisement
wrequiems

Untitled

Mar 18th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. def go():
  2.     h1, m1 = map(int, input().split(':'))
  3.     h2, m2 = map(int, input().split(':'))
  4.     t = ((m2 - m1) + (h2 - h1) * 60) // 2
  5.     m = m1 + t % 60
  6.     h = str(h1 + t // 60 + m // 60)
  7.     m = str(m % 60)
  8.     if len(m) == 1:
  9.         m = '0' + m
  10.     if len(h) == 1:
  11.         h = '0' + h
  12.     return "{}:{}".format(h, m)
  13.  
  14. print(go())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement