Pagini recente » Cod sursa (job #97154) | Cod sursa (job #798155) | Cod sursa (job #1588708) | Cod sursa (job #2826107) | Cod sursa (job #2129490)
program p1 ;
var k,i,n,j:longint;
g,h:text;
begin
assign (g,'fractii.in');
reset(g);
readln(g,n);
for i:=1 to n do begin
for j:=1 to n do begin
if not(i mod j=0) then
if not((i mod 2 =0) and (j mod 2 = 0)) then
if not((i mod 3 =0) and (j mod 3 = 0)) then
if not((i mod 5 =0) and (j mod 5 = 0)) then begin
inc(k);end;
if j=1 then inc(k);
end;
end;
close(g);
assign (h,'fractii.out');
rewrite(h);
writeln (h,k);
close(h);
end.