#include "stdio.h"
int main()
{
int m[2],n[2],r;
scanf("%d %d",&m[0],&n[0]);
if(n[0]>m[0])
{
m[1]=m[0],n[1]=n[0];
r=m[0],m[0]=n[0],n[0]=r;
}
while(1)
{
r=m[0]%n[0];
if(r==0)break;
m[0]=n[0],n[0]=r;
}
printf("%d %d",n[0],n[1]*m[1]/n[0]);
}
0.0分
0 人评分
哥德巴赫曾猜测 (C语言代码)浏览:2317 |
杨辉三角 (C语言代码)浏览:484 |
永远的丰碑 (C语言代码)浏览:516 |
陶陶摘苹果2 (C语言代码)浏览:595 |
C语言程序设计教程(第三版)课后习题8.4 (C语言代码)浏览:602 |
孤独的骑士 (C语言代码)浏览:1363 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:446 |
WU-蛇行矩阵 (C++代码)浏览:633 |
母牛的故事 (C语言代码)浏览:482 |
Manchester- 陶陶摘苹果浏览:4071 |