摘要: 求最大公约数GCD int GCD(int a,int b) { if(b==0) return a; else return GCD(b,a%b); } 求最小公倍数LCM int LCM(int x,int y) { return x*y/GDB(x,y); } 阅读全文