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