Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
128683 刘语晗 求最大公约数和最小公倍数 C++ 通过 100 0 MS 248 KB 196 2024-01-26 08:51:25

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


测评信息: