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