Pagini recente » Cod sursa (job #2843930) | Cod sursa (job #1170586) | Diferente pentru utilizator/eclipse intre reviziile 16 si 17 | Cod sursa (job #1465522) | Cod sursa (job #2428698)
var t:array[1..2000005] of integer;
n,i,j,x:longint;
begin
assign(input,'ciur.in'); reset(input);
assign(output,'ciur.in'); rewrite(output);
readln(n); t[1]:=1; x:=1;
for i:=2 to trunc(sqrt(n)) do
if t[i]=0 then
for j:=2 to n div i do
if t[i*j]=0 then
begin
t[i*j]:=1;
inc(x)
end;
writeln(n-x);
close(input);
close(output)
end.