nefu 84 http://acm.nefu.edu.cn/test/problemshow.php?problem_id=84
摘要:
#includeusing namespace std;typedef long long inta;int extend_gcd(inta a,inta b,inta &x,inta &y,inta &gcd){ if(b==0) { x=1; y=0; gcd=a; } else { extend_gcd(b,a%b,x,y,gcd); int temp=x; x=y; y=temp-a/b*y; }}int gcd(int a,int b){ if(b==0) return a; ... 阅读全文