扩展欧几里得 2019-05-10 数论 GCDEX(a,b,&x,&y) GCDEX(a,b,&x,&y)12345678if b==0 x=1 y=0 return agcd=GCDEX(b,a%b,x1,y1)x=y1y=x1-a/b*y1return gcd