提交时间:2023-01-01 15:53:13
运行 ID: 3348
#include<iostream> #include<algorithm> #include<cstdio> #include<queue> #include<stack> #include<cstring> using namespace std; int gcd(int a,int b){ if(b==0)return a; return gcd(b,a%b); } int main(){ int a,b; cin>>a>>b; int g=gcd(a,b); printf("%d,%d",g,a*b/g); return 0; } /* #include<cstdio> freopen("文件名.in","r",stdin); freopen("文件名.out","w",stdout); */