include
#include
int main()
{
int a, b, d;
scanf_s("%d%d", &a,&b);
for (d=b;d<=(a*b);d++)
{
if (d % a == 0 && d % b == 0)
{
printf("%d", d);
break;
}
}
return 0;
}
忘了在if下用{}把break括起来了,之后又改正了一下,找到最小公倍数的性质即可
区间是(两者之中最大的那个数,两者的积)



