40分,样例过了
#include <iostream>
#include <cstdio>
#include <map>
#include <vector>
#include <set>
using namespace std;
int gcd(int a,int b){
int k;
while(b>0){
k=a%b;
a=b;
b=k;
}
return a;
}
int lcm(int a,int b){
return a*b/gcd(a,b);
}
int main(){
int a,b;
cin>>a>>b;
cout<<gcd(a,b)<<" "<<lcm(a,b);
return 0;
}
各位大佬帮帮忙行不行啊!!