最大公约数和最小公倍数 欧几里得算法: int gcd(int a,int b){ return !b ? a : gcb(b, a % b); } 最小公倍数: int c=gcd(int a,int b); int d=a/c*b;