题解 | #小乐乐与欧几里得#
小乐乐与欧几里得
https://www.nowcoder.com/practice/da13e0cf321e4df9acd0fdf0a433cbb0
#include<stdio.h>
int main()
{
long m=0;
long n=0;
scanf("%ld%ld",&m,&n);
long p=m*n;
long t=m%n;
while(t)
{
m=n;
n=t;
t=m%n;
}
long sum=p/n+n;
printf("%.ld\n",sum);
return 0;
}