#include
int main()
{int a,b,r,lcm,gcd;
scanf("%d%d",&a,&b);
lcm=a*b;
while(r=a%b)
{a=b;
b=r;
}
gcd=b;
lcm/=gcd;
printf("最大公约数=%d\n最小公倍数=%d\n",gcd,lcm);
return 0;
}
#include unsigned int gcd ( unsigned int a,unsigned int b) { unsigned int max,min ; max=a; min=b; do { if ( max < min ) { int temp=max ; max=min; min=temp ; } max -= min ; } while( max != min ) ; return min ; } int main( void