Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
153546 Kevin C语言6.10 C++ Accepted 1 MS 272 KB 283 2026-05-21 15:41:34

Tests(1/1):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int m,n,gys,gbs,r; cin>>m>>n; int i=1; while(1){ if(i%m==0&&i%n==0){ gbs=i; break; } i++; } r=m%n; while(r!=0){ m=n; n=r; r=m%n; } gys=n; cout<<gys<<" "<<gbs; return 0; }