-paozi-

导航

2017年10月31日 #

exgcd求乘法逆元

摘要: #include #include using namespace std; int n,p,x,y; int exgcd(int a,int b,int &x,int &y){ int d=a; if(b==0){ x=1; y=0; return d; } else{ exgcd(b,a%b,y,x); y-=(a/b)*x; } return d; } ... 阅读全文

posted @ 2017-10-31 15:06 -paozi- 阅读(227) 评论(0) 推荐(0) 编辑