Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
128674 黄本瀚 求最大公约数和最小公倍数 C++ 通过 100 0 MS 244 KB 235 2024-01-26 08:43:29

Tests(3/3):


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


测评信息: