Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
128712 刘国洋 求最大公约数和最小公倍数 C++ 编译错误 0 0 MS 0 KB 218 2024-01-26 09:02:25

Tests(0/0):


#include <bits/stdc++.h > using namespace std; int main(){ int a,b,s,x,n; cin>>a>>b; s=a%b; x=a; n=b; while(s!=0) { a=b; b=s; s=a%b; } cout<<b<<" "<<x/b*n; return 0; }


测评信息: