Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
5590 黄宜洋 两个数的最小公倍数 C++ Accepted 0 MS 260 KB 270 2024-11-30 16:32:45

Tests(10/10):


Code:

# include<iostream> using namespace std; int gcd(int a,int b){ int c=-1; while(c!=0){ c=a%b; a=b; b=c; } return a; } int main(){ int a,b; cin>>a>>b; int c=gcd(a,b); cout<<a/c*b/c*c; return 0; }