Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
128670 黄本瀚 求最大公约数和最小公倍数 C++ 解答错误 0 0 MS 252 KB 218 2024-01-26 08:37:01

Tests(0/3):


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


测评信息: