标签:eof sam code turn des 包含 整数 otto include
题目链接:
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
# include <stdio.h> int 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\n",c); } return 0; }
标签:eof sam code turn des 包含 整数 otto include
原文地址:http://www.cnblogs.com/love-sherry/p/6942083.html