Var n,h,m,s:integer;
begin
readln(n);
n:=n mod (24*3600);
h:=n div 3600;
m:=(n-h*3600) div 60;
s:=n mod 60;
write(h,':');
case m of
0: write('00:');
1..9:write('0',m,':');
else write(m,':');
end;
case s of
0: writeln('00');
1..9:writeln('0',s);
else writeln(s);
end;
end.
Пример:
129700
12:01:40