Var
a:array[1..1000] of extended;
i,n:longint;
begin
readln(n);
for i:=1 to n do read(a[i]);
writeln;
for i:=1 to n do writeln(a[i]:0:3);
end.
<span>
</span>
3 DIM i As Int, j As Int, P As Int, K As Int
7 P = 0 : K = i
9 If NAZ$=RM$(j) Then P = P + KOL Else RM$(j) = NAZ$ : P = KOL
11 KM(i) = P
Вроде бы так