var a, b, c, d, i, n :integer; procedure swap (a, b :integer; c, d :integer); begin if a>b then begin c:=a; d:=a; end else begin c:=b; d:=a; end; end; begin read (a, b); swap(a, b, a, b); for i:=1 to a do if (a mod i=0) and (b mod i=0) then c:=i; write (a*b/c); end.
Answers & Comments
Verified answer
var a, b, c, d, i, n :integer;procedure swap (a, b :integer; c, d :integer);
begin
if a>b then begin c:=a; d:=a; end
else begin c:=b; d:=a; end;
end;
begin
read (a, b);
swap(a, b, a, b);
for i:=1 to a do if (a mod i=0) and (b mod i=0) then c:=i;
write (a*b/c);
end.