Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
128687 林汐 求最大公约数和最小公倍数 C++ 解答错误 0 0 MS 244 KB 204 2024-01-26 08:52:48

Tests(0/3):


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


测评信息: