Pagini recente » Cod sursa (job #3129911) | Cod sursa (job #2310642) | Cod sursa (job #2626510) | Cod sursa (job #676035) | Cod sursa (job #2129034)
program fractii;
Label 1;
type tab = array [1..100] of real;
var m,x,i,j:integer;
a:tab;
n:longint;
b:boolean;
k:real;
f,g:text;
begin
assign(g,'fractii.in');
assign(f,'fractii.out');
reset(g);
b:=false;
readln(g,n);
if (n<1) or (n>1000000) then goto 1;
m:=0;
for i:=1 to n do begin
for j:=1 to n do begin
k:=i/j;
b:=false;
for x:=1 to m do
if a[x]=k then b:=true;
if b=False then begin inc(m); a[m]:=k; end;
end;
end;
1:rewrite(f);
writeln(f,m);
close(f);
close(g);
end.