program prog;
const n=10;m=15;
var a:array [1..n,1..m] of integer;
b:array [1..m] of real;
i,j,s,sum,k:integer;
begin
randomize;
for i:=1 to n do
begin
for j:=1 to m do begin a[i,j]:=random(100);write(a[i,j]:3);end;
writeln;
end;
writeln;
for i:=1 to m do
begin
sum:=0;k:=0;
for j:=1 to n do
begin
s:=a[j,i] mod 10; //write(' ',s);
if s<>0 then
if a[j,i] mod s=0 then
begin
sum:=sum+a[j,i];inc (k);
end;
end;
b[i]:=sum/k;
end;
for i:=1 to m do write(b[i]:5:1);
end.