题解 | #求最小公倍数#
求最小公倍数
http://www.nowcoder.com/practice/22948c2cad484e0291350abad86136c3
#include<stdio.h>
int main(){
int a=0,b=0,max=0,min=0;
while(scanf("%d%d",&a,&b)==2){
max=a;
min=b;
if(b>max){
max=b;
min=a;
}
int minbs=0;
for(int i=1;i<=min;i++){
if((max*i)%min==0){
minbs=max*i;
break;
}
}
printf("%d",minbs);
}
}