program cheng;
var
n,i,m,k,c:longint;
begin
while not eof do begin
k:=0;
read(n,m);
if m>=n
then
begin
c:=m;
m:=n;
n:=c;
end;
for i:=2to m do
if ((n mod i)=0)and((m mod i)=0)
then k:=i;
write(k);
end;
end.
超时了!我估计是我思路有问题,望高人点拨点拨!谢!