标签:io amp a return print mat include main
#include<stdio.h>
#include<math.h>
int main()
{
int n;
int a,b,r;
int p,t;
scanf("%d",&n);
while(n--)
{
scanf("%d %d",&a,&b);
if(a<b)
{
t=a;
a=b;
b=t;
}
p=a*b;
while(b!=0)
{
r=a%b;
a=b;
b=r;
}
printf("%d %d\n",a,p/a);
}
return 0;
}
标签:io amp a return print mat include main
原文地址:http://www.cnblogs.com/qq11/p/3871453.html