提交时间:2024-11-19 10:48:43
运行 ID: 57027
#include<bits/stdc++.h> using namespace std; int main() { int m,n,r,j; cin>>m>>n; r=m%n; j=m*n; while(r!=0) { m=n; n=r; r=m%n; } cout<<n<<","<<j/n<<endl; return 0; }