Pagini recente » Diferente pentru problema/robot intre reviziile 6 si 5 | Monitorul de evaluare | Cod sursa (job #2557539) | Cod sursa (job #2156351) | Cod sursa (job #579376)
Cod sursa(job #579376)
program ciur;
var n,i,count,j:longint;x:array[1..2000000] of boolean;f:text;
begin
assign(f,'ciur.in');
reset(f);
readln(f,n);
close(f);
for i:=2 to n do if x[i]=false then begin
j:=2;
while j*i<=n do begin
x[j*i]:=true;
j:=j+1;
end;
count:=count+1;
end;
assign(f,'ciur.out');
rewrite(f);
writeln(f,count);
close(f);
end.