题目链接:
http://acm.hdu.edu.cn/showproblem.php?pid=1108
题目类型:
数论
题意概括:
求两个数的最小公倍数
解题思路:
模拟
题目:
最小公倍数
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 56011 Accepted Submission(s): 31103
# includeint aaa(int x,int y) {int c,d,r,e;c=x;d=y;while(r=x%y,r!=0){x=y;y=r;}e=(c/y)*(d/y)*y;return e; }int main () {int a,b,c;while(scanf("%d%d",&a,&b)!=EOF){c=aaa(a,b);printf("%d ",c);}return 0; }