Pagini recente » Cod sursa (job #1333883) | Cod sursa (job #1449564) | Cod sursa (job #626628) | Cod sursa (job #1193791) | Cod sursa (job #1748)
Cod sursa(job #1748)
var u,n,i,j,k:integer;
begin
assign(input,'fractii.in');
reset(input);
read(input,n); close(input);
for i:=1 to n do
for j:=1 to n do
begin
for u:=2 to n do
begin
while i<>j do
begin
if i>j then i:=i-j
else j:=j-i;
end;
if i<>u then k:=k+1;
end;
end;
assign(output,'fractii.out');
rewrite(output);
write(output,k+1);
close(output);
end.