Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
1256 李羽 两个数的最小公倍数 C++ Accepted 0 MS 264 KB 264 2023-08-23 11:02:04

Tests(10/10):


Code:

#include<iostream> using namespace std; int main(){ int a,b,y,temp,aa,bb; cin>>a>>b; aa=a; bb=b; if(a<b){ temp=a; a=b; b=temp; } while(1){ y=a%b; if(y==0){ cout<<aa*bb/b;break; } else{ a=b;b=y; } } return 0; }