#include<stdio.h>
int Gcd(int x,int y){return y ? Gcd ( y , x % y ): x ;
}int main()
{int a,b;while(scanf("%d %d",&a,&b)==2){if(a==0&&b==0) return 0;else printf("%d\n",a*b/Gcd(a,b)); }return 0;
}
从这里写还是有一点收获QAQ
#include<stdio.h>
int Gcd(int x,int y){return y ? Gcd ( y , x % y ): x ;
}int main()
{int a,b;while(scanf("%d %d",&a,&b)==2){if(a==0&&b==0) return 0;else printf("%d\n",a*b/Gcd(a,b)); }return 0;
}
从这里写还是有一点收获QAQ