Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
128689 刘一诺 求最大公约数和最小公倍数 C++ 通过 100 0 MS 240 KB 199 2024-01-26 08:53:32

Tests(3/3):


#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; }


测评信息: