ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
~~~ #include<iostream> using namespace std; int main() { int gcd(int a,int b); int a,b; while(cin>>a>>b&&a<=1000&&b<=1000) { int c=gcd(a,b); c=a/c*b; cout<<c<<endl; } return 0; } int gcd(int a,int b) { int r=1; while (r>0) { r=a%b; a=b; b=r; } return a; } ~~~