hdu 1108 最小公倍数
2012-04-03 17:01
218 查看
http://acm.hdu.edu.cn/showproblem.php?pid=1108
View Code
View Code
#include<iostream> #include<cmath> using namespace std; int gcd(int a1,int b1)// { int a=max(a1,b1); int b=min(a1,b1); int temp=a%b; while(temp!=0) { a=b; b=temp; temp=a%b; } return b; } int main() { int a,b; while(cin>>a>>b) { cout<<a*b/gcd(a,b)<<endl; } return 0; }
相关文章推荐
- acm--最小公倍数(HDU 1108)
- HDU 1108 最小公倍数
- hdu 1108 最小公倍数
- hdu 1108 最小公倍数 (GCD)
- HDU——1108 最小公倍数(水一水)
- hdu-1108 最小公倍数
- HDU 最小公倍数 1108 【水】
- hdu 1108 最小公倍数
- HDU 1108 最小公倍数【欧几里得算法】【更相减损术】【stein算法】
- HDU 1108 最小公倍数
- HDU 1108 最小公倍数(水~)
- 【HDU - 1108】 最小公倍数
- HDU 1108 最小公倍数(lcm)
- HDU 1108 最小公倍数
- HDU 1108 最小公倍数
- HDU 1108 最小公倍数 欧几里得算法
- hdu 1108 最小公倍数
- hdu-1108-最小公倍数
- 【hdu 1108】最小公倍数
- hdu 1108 最小公倍数