| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 | 
|---|---|---|---|---|---|---|---|---|
| 135181 | 罗嘉睿 | 最大公约数和最小公倍数 | C++ | Accepted | 1 MS | 272 KB | 333 | 2025-11-02 17:39:35 | 
#include <iostream> using namespace std; int gcd(int a,int b) { while(b!=0) { int x=b; b=a%b; a=x; } 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)<<endl; return 0; }