main(){int a,m,n,sum=0;long b,c=0printf("input m,n");scanf("%d,%d",&n,&m);for(a=1;a<=(m<n)?m:n;a++)if(m%a==0&&n%a==0)sum=a;b=m*n;for(c=(m>n)?m:n;c<=b;a++)if(c%m==0&&c%n==0)break;printf("%d,%ld",sum,c);}
看不懂 没缩进 强.