int gcd(int a,int b)//**最大公约数**// { if(b==0) return a; return gcd(b,a%b); } int lcm(int a,int b)//**最小公倍数**// { int c=gcd(a,b); return a*b/c; }