ОА
Ольга Агеева
Главная » Образование » Школы
VAR s:real;
c,t,i,j,N:integer;
BEGIN
readln(N);
s:=0;
c:=0;
for j := 2 to N do
begin
t :=j;
for i := 2 to j-1 do if j mod i = 0 then t :=0;
if t<>0 then begin inc(c);s:=s+t end;
end;
if c>0 then s:=s/c;
writeln(s:5:5);
readln;
END.