Pagini recente » Cod sursa (job #2362081) | Cod sursa (job #1851811) | Cod sursa (job #1387893) | Cod sursa (job #285771) | Cod sursa (job #1135443)
program curul_e;
Var f, g : text;
i, n : longword;
k:longint;
Begin
Assign(f, 'ciur.in' );
Reset(f);
Read(f, n);
if n<8 then
if n<6 then
if n<4 then
if n<3 then
k:=1
else
k:=2
else
k:=3
else
k:=4
else
k:=4;
fOr i:=2 to n do
if (i mod 2<>0) and (i mod 3<>0) and (i mod 5<>0) and (i mod 7<>0) then
k:=k+1;
Close(f);
Assign(g, 'ciur.out') ;
Rewrite(g);
Write(g,k);
Close(G);
End.