program taimer; var ch1,ch2,cch2,mch2,sch2,wyx:string; k,w,z,i,y,c1ch1,c2ch1,m1ch1,m2ch1,s1ch1,s2ch1,cn1ch1,cn2ch1,cnoch1,mn1ch1,mn2ch1,mnoch1,sn1ch1,sn2ch1,snoch1:integer; cnch2,mnch2,smch2,cnoch2,mnoch2,snoch2,co,mo,so,f,sp,mp,cp:integer; begin k:=1; w:=0; writeln('введите первое число'); readln(ch1); begin c1ch1:=ord(ch1[1]); c2ch1:=ord(ch1[2]); cn1ch1:=c1ch1-(ord(0)); cn2ch1:=c2ch1-(ord(0)); cnoch1:=(cn1ch1*10)+cn2ch1; m1ch1:=ord(ch1[4]); m2ch1:=ord(ch1[5]); mn1ch1:=m1ch1-(ord(0)); mn2ch1:=m2ch1-(ord(0)); mnoch1:=(mn1ch1*10)+mn2ch1; s1ch1:=ord(ch1[7]); s2ch1:=ord(ch1[8]); sn1ch1:=s1ch1-(ord(0)); sn2ch1:=s2ch1-(ord(0)); snoch1:=(sn1ch1*10)+sn2ch1; end; readln(ch2); begin for i:=1 to length(ch2) do begin z:=ord(ch2[i]); if (z<>ord(';')) and (k=1) then cch2:=cch2+ch2[i] else if (z<>ord(';')) and (k=2) then mch2:=mch2+ch2[i] else if (z<>ord(';')) and (k=3) then sch2:=sch2+ch2[i] else if (z=ord(';')) then k:=k+1; end; end; for i:=length(cch2) downto 1 do begin y:=exp(ln(10)*i); cnch2:=(ord(cch2[i]))-ord(0); w:=w+1; cnoch2:=cnoch2+(cnch2[w]*y); end; for i:=length(mch2) downto 1 do begin y:=exp(ln(10)*i); mnch2:=(ord(mch2[i]))-ord(0); w:=w+1; mnoch2:=mnoch2+(mnch2[w]*y); end; for i:=length(sch2) downto 1 do begin y:=exp(ln(10)*i); snch2:=(ord(sch2[i]))-ord(0); w:=w+1; snoch2:=snoch2+(snch2[w]*y); end; co:=cnoch1+cnoch2; mo:=mnoch1+mnoch2; so:=snoch1+snoch2; sp:=so mod 60; f:=so div 60; mo:=mo+f; mp:=mo mod 60; f:=mo div 60; co:=co+f; cp:=co mod 60; f:=co div 60; writeln(cp,':',mp,':',sp,'+',f); readln(wyx); end.