Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
100808 魏宏搏 两个数的最小公倍数 C++ Accepted 1 MS 272 KB 305 2024-12-14 10:22:22

Tests(10/10):


Code:

#include<iostream> using namespace std; int main(){ int a,b,max; cin>>a>>b; if(a>b){ max=a; } else{ max=b; } for(int i=max;i<=a*b;i++){ if(i%a==0 && i%b==0){ cout<<i<<endl; break; } } return 0; }