program test;var speed, sum, i, hours: integer;begin sum:=0; speed:=5; hours:=5; for i:=hours downto (hours - 5) do begin sum:=sum+speed; speed:=speed-1; end; writeln(sum, 'km'); readln;end.
program test;
var speed, sum, i, hours: integer;
begin
sum:=0;
speed:=5;
hours:=5;
for i:=hours downto (hours - 5) do
begin
sum:=sum+speed;
speed:=speed-1;
end;
writeln(sum, 'km');
readln;
end.