Var a,b,c:integer; procedure main(a,b,c:integer); var i,max,nod:integer; begin if (a>b) and (a>c) then max:=a else if (b>a) and (b>c) then max:=b else max:=c; nod:=1; for i:=1 to max do begin if (a mod i = 0) and (b mod i = 0) and (c mod i = 0) then nod:=i; end; writeln(nod); end; begin read(a,b,c); main(a,b,c); end.
a,b,c:integer;
procedure main(a,b,c:integer);
var
i,max,nod:integer;
begin
if (a>b) and (a>c) then
max:=a
else
if (b>a) and (b>c) then
max:=b
else
max:=c;
nod:=1;
for i:=1 to max do
begin
if (a mod i = 0) and (b mod i = 0) and (c mod i = 0) then
nod:=i;
end;
writeln(nod);
end;
begin
read(a,b,c);
main(a,b,c);
end.