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