摘要: procedure exgcd(a,b:int64); var t:longint; begin if b=0 then begin x:=1;y:=0; exit; end else exgcd(b,a mod b); t:=x;x:=y;y:=t-(a div b)*y; end; function cfny(a:int64):int64; var b:longint; begin b:=zs; exgcd(a,b); cfny:= ((x mod zs)+zs) mod zs; end; 阅读全文
posted @ 2016-03-18 10:43 z1j1n1 阅读(363) 评论(0) 推荐(0) 编辑