если в паскале то
var n, i, sum, k : integer;begin read (n); for i := 1 to n do begin read (k); if k mod 15 = 0 then sum := sum + k; end; writeln (sum / n);end.
если в паскале то
var
n, i, sum, k : integer;
begin
read (n);
for i := 1 to n do
begin
read (k);
if k mod 15 = 0 then sum := sum + k;
end;
writeln (sum / n);
end.