文章
227
粉丝
0
获赞
1024
访问
39.4k
#include<iostream> using namespace std; int gcd(int a,int b) { return b==0 ? a : gcd(b,a%b); } int main() { int a,b; cin>>a>>b; if(a<b) swap(a,b); int res1=gcd(a,b); int res2=a*b/res1; cout<<res1<<" "<<res2; return 0; }
登录后发布评论
暂无评论,来抢沙发