Var n,h,m,s:integer;
begin
write('n = ');
readln(n);
h:=n div (60*60);
m:=n mod (60*60) div 60;
s:=n mod 60;
write(h,':');
if m<10 then write(0);<br>write(m,':');
if s<10 then write(0);<br>writeln(s);
end.
Пример 1:
n = 86399
23:59:59
Пример 2:
n = 18125
5:02:05