这不挺简单吗??
h,m,k = map(int,input().replace(":"," ").split()) h1=((m+k)//60+h)%24 m1=(m+k)%60 print("{:02d}:{:02d}".format(h1,m1))