Pagini recente » Diferente pentru problema/oypara intre reviziile 3 si 2 | Cod sursa (job #2007483) | Cod sursa (job #544010) | Cod sursa (job #617979) | Cod sursa (job #579371)
Cod sursa(job #579371)
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;
end else count:=count+1;
assign(f,'ciur.out');
rewrite(f);
writeln(f,count);
close(f);
end.